[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Enable SSH access to ESX 4.x VMware Server

Published on
9,406 Points
2 Endorsements
Last Modified:
As an ESX VMware OS Administrator, sometimes we need to get remote terminal access to the servers, the reasons can be multiple: our user interface crashed, server cannot be accessed via GUI but can be pinged, terminal access is the only option to use some functions or just to feel the power of the command prompt.

The SSH protocol can be used to get access to the remote terminal of your servers. Why not telnet? telnet is a plain-text protocol which can be easily violated. Read more: wiki.

Now, to get access to the terminal console using SSH, first of all we need to check if the server has SSH service enabled.

SSH Server on ESX

Activating SSH Server on ESX


Select the server you want to grant SSH access


Select  "Configuration" tab


Select "Security Profile" optionAs you can see on the image, the SSH Server is already enabled in my ESX server, if you don't have it, you need to enable it:


Select "Properties..." optionSecurity Options - Properties


Check the "SSH Server" optionOk, now you are ready to access via SSH to your server, but you don't have a user more than root to access.

Trying to access with root user via SSH to the server

Now, if you try to access via SSH with root user you will get the following message (i'm using OpenSSH for Windows as SSH Client in this tutorial):
Enable root access via SSHAs you can see, we cannot access via SSH with the root user, that's cause ESX has SSH root access unable by default.

Enabling root access via SSH

We need to access via SSH with another user than root:
Login normal user and ssh_config editLog in via SSH, than type the reserved word "su" to get root authentication and type the password for root user.

Next step is to edit the file sshd_config. As shown in the previous image, type "nano /etc/ssh/sshd_config" and press enter.

The following screen will apear. Scroll down and edit the option "PermitRootLogin":
PermitRootLogin ssh_config editionReplace the "no" with a "yes". Press Ctrl+o to save it, and Ctrl+x to exit.

You will have to restart the ssh service, type "/etc/init.d/sshd restart" to restart the service on the server.

Now you can exit and try log in with root user again:
Root loginAs you can see, we got access via SSH to the server.

Differences between log in directly with root and switching to root from another user

Why did we logged in with root directly if we already got root authentication via any other user? let's see the next 2 images:
Difference normal user & root user 1Difference normal user & root user 2For example, as you can see in the title bar of the first image, a normal user is logged and than switched to root user. The commands available in that case are just 2, that means minimal functions are available in that way. In the other case, on the second image you can see the root user logged directly and more functions are available (those are the most used functions by the way), so you can manage via SSH your server.

Any comments appreciated. Like if it was useful or if you just liked my article, thanks.

Expert Comment

Great article! Have shared with all my VMWare Administrators.


Author Comment

by:Ricardo Martínez
Thank you! i'm glad my article is helpful for you, i think this is a knowledge that all of us that work with ESX need to know.


Featured Post

IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month