Enabling SSH access in ESXi
Posted on 05.Aug 2010 by Ray Heffer in ESXi, Virtualisation, VMware
If you are running VMware ESXi 4.1 then you can now activate SSH access (or Remote Tech Support) easily which is documented here: http://www.thomasmaurer.ch/2010/07/activated-ssh-on-esxi-4-1/
However, if you are working on ESXi 3.5 or 4.0 then you need to enter unsupported mode:
1) Press ALT & F1 to access the console.
2) Type: unsupported (you won’t see any characters on screen), then press Enter.
3) Edit /etc/inetd.conf, find the line starting with #SSH and remove the #. See my note below on using Vi with ESXi
4) Exit Vi (Type :wq)
5) Restart the management services: /sbin/services.sh restart
6) If you are running ESXi 3.5 Update 2 then you will also have to kill the inetd process. Type ps | grep inetd to find the process ID and then kill it with kill -HUP <ID>
Using Vi with ESXi
I don’t use anything other than Vi when editing files in Linux, but for most Linux users Nano is the editor of choice. Don’t fret, Vi is not that difficult, and the following steps will be enough to open a file, make some changes, save and quit Vi.
1) Open /etc/inetd.conf with Vi:
# vi /etc/inetd.conf
2) Jump straight to the line starting with SSH: Type /ssh and it will jump to the first occurrence of ssh. A bit like search in Word.
3) Make sure the cursor is at the start of the line starting with #SSH and press x to delete a character (delete #)
4) Press Escape to make sure it is not in editing mode, and type :wq and press enter. This writes and quits.
Accidently killed inetd without the -HUP switch?
I once used kill -9 instead of -HUP which stops and restarts the process. If you cannot afford to restart the ESXi host there is a way of starting inetd with ESXi:
# cat /var/run/inetd.pid
This will give you a process ID (a very long number)
# kill -HUP <ID>


therez no file /var/run/inetd.pid nevertheless i knew what pid it had so cannot kill -HUP
FYI
my post was about Accidently killed inetd without the -HUP switch?