Enable SSH Access to vSphere ESXi

for ESX click here

KB ID 0000299 Dtd 07/12/11


Should you wish to get SSH (remote secure console) access to your ESXi 4 hosts, you need to do the following,

ESXi version 5 and Newer

ESXi version 4.1.0

ESXi version 4.0.0 and earlier

ESX version 4.0.0 and earlier

WARNING: Command line access to an ESXi server is NOT supported by VMware (unless they tell you to do it for support).


Grant SSH Access to ESXi 5

Starting with ESXi 5 you can enable SSH access remotely, because like ESX it has a built in firewall (though its NOT the same firewall that was in ESX!). Just as with version 4.1.0 you can enable SSH Locally from the console from troubleshooting options.

Enable Remotely

1. Log into the host with the VI client > Select the host > Configuration > Security Profile > Properties.

enable ssh remotely

2. Locate SSH Server > Tick it > Options > You can either manually start it or set it to start automatically.

enable ssh remotely

3. You will see the following warning to "retrieve" the firewall settings (because you have just changed them) > Select Yes.

enable ssh remotely

Note: Having it running will still cause the "Configuration Issues - SSH for the host has been enabled" nag screen on the summary tab of the host.

enable ssh remotely

Grant SSH Access to ESXi 4.0.1

Starting with version 4.0.1 you can enable SSH access form the server console.

1. Go to the normal ESXi console > Press F2 > Log in >Troubleshooting Options.

enable in esx

2. Select "Enable Remote Tech support" toggle on and off with {enter} if you want to SSH in the server remotely using PuTTy for example > If you want to log on directly at the console choose "Enable Local Tech Support".

enable in esx

3. Note: Having it running will still cause the "Configuration Issues - Remote Tech support Mode (SSH) for the host {hostname} has been enabled" nag screen on the summary tab of the host.

enable in esx

Grant SSH Access to ESXi 4.0.0 and earlier

1. Go to the normal ESXi console.

ESX Enble SSH Access

2. Press ALT+F1 > the screen will change > Type unsupported {enter} > Note: Nothing will appear on the screen till you hit {enter} > Type in the root password and press {enter}.

ESX Enble SSH Access

3. You now nee to edit a config file, the only editor we have is vi (sorry) issue the following command,

vi /etc/inetd.conf

ESX Enble SSH Access

4. The vi editor will open the file, use the arrow keys to move down to the line that says,

#ssh stream tcp nowait root...

Press I on the keyboard (that puts the vi editor into insert mode) and delete the hash "#" mark from the beginning of the line.

ESX Enble SSH Access

5 Then, to save the changes press {Esc} > type in :wq {Enter} (that's write the changes and quit if your interested).

ESX Enble SSH Access

6. Enter the following command,

It will provide you with a number (in the example below its 4983, yours will be different).

ESX Enble SSH Access

7. Issue the following command,

ESX Enble SSH Access

8. To get back to the usual ESXi screen and exit command line press ALT+F2.

ESX Enble SSH Access

9. You can now connect with an SSH client like Putty.


Related Articles, References, Credits, or External Links

Thanks to Dave Corrasa for the feedback.

Author: Migrated

Share This Post On