Aug 11, 2010

VMWare ESXi Hack to Allow SSH

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.

  1. Change directory into /etc

    #cd /etc
  2. Open inetd.conf in vi (I know vi sucks, deal with it!)

    #vi inetd.conf
  3. arrow down until you see #ssh stream tcp…
  4. With the curser on the # type x to delete the #
  5. Type :wq! to exit vi and save your changes
  6. Now we need to find the process running inetd. To do that run the following command

    #ps -a | grep inetd
  7. Find the process number, lets pretend it is 1234. Run the following command to kill the inetd process

    #kill 1234
  8. Now we need to start inetd again

  9. Bam! SSH into your ESXi box!

Love ESXi? Why not buy an ESXi shirt from the Bauer-Power Gear store?

VMWare too esxi Know of any other cool hacks to get additional functionality out of ESXi? Hit us up in the comments!

Technorati Tags: ,,,

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam