Mar 4, 2015

VMware ESXi – How to enable SSH Connectivity

VMware ESXi (formerly ESX) is an enterprise-class, type-1 hypervisor developed by VMware for deploying and serving virtual computers. As a type-1 hypervisor, ESXi is not a software application that one installs in an operating system; instead, it includes and integrates vital OS components, such as a kernel.

After version 4.1, VMware renamed ESX to ESXi. ESXi replaces Service Console (a rudimentary operating system) with a more closely integrated OS. ESX/ESXi is the primary component in the VMware Infrastructure software suite.

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

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

Step 3. When prompted enter in the Root password and press.

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

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.

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/ 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.

Step 8. From running this command we can see that the process ID for ‘inetd’ is 1331. Now type kill –HUP where 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.


Post a Comment