VMWare ESXi is running on a proprietary version of Linux. This is a fact. Another fact is that in order to do Linux type stuff in VMWare you need access to the console. Now, I know what you are thinking, there is no console in VMWare ESXi. Well my firend, that is simply not true. How the hell do you think VMWare tech support will get in to fix it when you blow it up? If you guessed console, then give yourself a pat on the back.
There is a secret access into the ESXi console, that is only officially supported if tech support needs to whip out some VM kung fu. Doesn’t mean you and I can’t access it, it just isn’t supported. To access the consol, at the Administration Window press ALT + F1. You will get a black screen, type the word unsupported and press enter. You will not be able to see yourself type. After you hit enter, you will be prompted for the root password. Enter your root password and bammo! You will now have a prompt!
Well that is cool and all, but we as IT guys want remote console access right? How do you go that in Linux? SSH right? I know what you are thinking, SSH is disabled in ESXi too. Well, now that we have console access, we have a lot of possibilities. One of those is to enable SSH. To do that just follow these steps.
- Change directory into /etc
- Open inetd.conf in vi (I know vi sucks, deal with it!)
- arrow down until you see #ssh stream tcp…
- With the curser on the # type x to delete the #
- Type :wq! to exit vi and save your changes
- Now we need to find the process running inetd. To do that run the following command
#ps -a | grep inetd
- Find the process number, lets pretend it is 1234. Run the following command to kill the inetd process
- Now we need to start inetd again
- Bam! SSH into your ESXi box!