VMware ESXi – How to enable SSH Connectivity.

# VMware

To enable SSH on VMware ESXi you need to enter an ‘unsupported’ mode.  For background information on this mode and why the Service Console (SC) that you are probably familiar with from ESX (ie: non ESXi) is by default missing see my other article here.

Enabling SSH is straight forward -  just follow these 8 basic steps:

Step 1. Connect to ESXi console and press the Alt+F1 key combination.

VMware ESXi SSH

Step 2. Type ‘unsupported’ and then press <Enter>. Note that nothing will appear on the screen whilst you type this.

VMware ESXi SSH 

Step 3.  When prompted enter in the ‘Root’ password and press <Enter>.

VMware ESXi SSH

Step 4. You will now be presented with a prompt on the console. From this prompt type ‘vi /etc/inetd.conf

VMware ESXi SSH

Step 5. vi (the file editor) has now opened the inetd.conf file.  Using the direction arrows scroll through the lines until you reach the line that has ‘#ssh’ and remove the hash (ie: #).  This is effectively un-commenting this line so that the ssh service can be started.

VMware ESXi SSH

Step 6. Now that you have made this minor file you want to save this change and exit out of the editor (vi).  To do this press the ESC key (to put vi back into Command Mode) and then type ‘:wq’  *Note: If you want to exit without saving any changes to the file then just press the ESC key (Command Mode) and then type ‘:q!’.

Step 7.  With the SSH service now un-commented from this file we want to restart the ‘inetd’ process so that it starts again and reads in the newly altered file which will tell it to start the SSH service. 

This is the part of the enabling SSH that has changed between minor revisions of ESXi as pre-ESXi Update 2 you would run the command ‘/sbin/services.sh restart’  though for any release of ESXi Update 2 and more recent we have effectively kill the ‘inetd’ process to make it automatically restart again.

To do this we first need to find out what the process ID is of ‘inetd’.  From the console command prompt type ‘ps | grep inetd’ which will give you a result similar to the following.

VMware ESXi SSH

Step 8. From running this command we can see that the process ID for ‘inetd’ is 1331.  Now type ‘kill –HUP <insert process ID>’ where <insert process ID> is the process ID seen in the previous step.

Finished!  Congratulations – you should now be able to connect to your ESXi server via a SSH client such as Putty.

 

Technorati Tags: ,,,,,
VN:F [1.8.5_1061]
Rating: 5.0/5 (1 vote cast)
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
VMware ESXi – How to enable SSH Connectivity.5.051

Related posts:

  1. How to create a bootable VMware ESXi 3.5 & 4.0 (vSphere) USB pen drive. There are a couple of methods to create a...
  2. Installing VMware ESXi 4.0 on a USB Memory Stick “The Official Way” Since writing my original post last year on installing...
  3. How to automatically shut down VMware ESXi gracefully during power failure using an APC UPS. A Windows script to shutdown free-licensed ESXi 4 hosts that...
  4. HP ML110 G5 – Upgrading to VMware ESX/ESXi U4 and getting error: “The VMware ESX Server does not have persistent storage” VMware ESX/ESXi Update 4 (U4) has brought good and...
  5. How to view your VMware ESXi Host’s System Log, Config and Datastore via a web browser. Looking for an easy way to view your VMware...

You can leave a response, or trackback from your own site.

7 Responses to “VMware ESXi – How to enable SSH Connectivity.”

  1. mattywhi says:

    Is this how you can also enable SNMP for an ESX host?

    UN:F [1.8.5_1061]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.5_1061]
    Rating: 0 (from 0 votes)

    [Reply]

    toody Reply:

    ESX supports snmp, the free edition of ESXi does not (not even unsupported). u need to get a licensed ESXi for this to work

    UN:F [1.8.5_1061]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.5_1061]
    Rating: 0 (from 0 votes)

    [Reply]

  2. Trabalash says:

    “q not implemented”. Editing the file not working at all.

    UN:F [1.8.5_1061]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.5_1061]
    Rating: 0 (from 0 votes)

    [Reply]

    Kiwi Si Reply:

    Hi Trabalash,

    The command youn should be typing in is ‘:wq’ not just ‘q’ on its own.

    Cheers,

    Si

    UA:F [1.8.5_1061]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.5_1061]
    Rating: 0 (from 0 votes)

    [Reply]

  3. [...] future reference to enable SSH in ESXi Categories: Linux, Projects, VMWare Komentar (0) Lacak Balik (0) [...]

  4. anonymous says:

    take a look here http://salawank.performance-weaver.com for snmp

    UN:F [1.8.5_1061]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.5_1061]
    Rating: 0 (from 0 votes)

    [Reply]

  5. [...] doesn’t have a Service Console like ESX. Therefore, you can’t SSH to the server without entering unsupported mode. That process may be a hassle if all you need to do is modify VM configuration files. Of ourse, you [...]

Leave a Reply

You can add images to your comment by clicking here.

Veeam - Backup & Replication
TrainSignal - vSphere Pro
Virtu-Al.net
StarWind Software
Virtualization Pro Summit 2010
PHD Virtual - esXpress