vSphere 5.x – How to Enable SSH & ESXi Shell

Here’s a quick post on how to enable SSH and the ESXi shell on VMware vSphere 5.1 and 5.x in easy steps, using two different methods.  The first method is via the ESXi/vSphere Hypervisor console window and the second is using the vSphere Client interface.

I find when using my home lab that I often want to connect to my ESXi host using an SSH connection so figured this post may be of use to others who are either first starting out with VMware vSphere or perhaps also run their own lab and needed a memory jogger.

Enable SSH & ESXi Shell via the ESXi Console

Gaining access to your ESXi host’s console window isn’t always straight forward, at least not in a production environment, due to physical access restrictions.  Though in your lab environment, assuming you have a keyboard and monitor connected to the host, you can easily enable SSH and the ESXi Shell via the console window in a couple of basic steps.

First log into the ESXi console, bring up the logon box by pressing the <F2> button.

VMware vSphere How to enable SSH

At the “Authentication Required” logon window enter your login username and password, then press the <Enter> key to continue.

VMware ESXi 5.1 Enable SSH

From the “System Customization” screen scroll down to “Troubleshooting Options” and press the <Enter> key.

VMware vSphere 5.1 Enable SSH

You’ll now see four options under the “Troubleshooting Mode Options” menu, from here you toggle between enabling and disabling the “ESXi Shell” and/or “SSH”.  By highlighting the relevant option and pressing the <Enter> key you can toggle between enabling and disabling that part particular option.

As you can see from the screenshot below, if the option giving you the option to “Enable” it then that means that the setting is currently disabled.

Enable SSH vSphere

In this example I want to enable SSH on the ESXi 5.x host so I highlight the relevant line and then press the <Enter> key.

Disable SSH vSphere ESXi

After setting the options simply exit back out of the console window.

Now let’s take a look at performing the same thing, but this time from within the vSphere Client.

 

Enable SSH & ESXi Shell using the vSphere Client

Point your VMware vSphere Client application/utility at your ESXi host.

VMware Client SSH Enable

Click on the “Configuration” tab and then from the “Software” menu on the left hand side of the screen, select “Security Profile”.

SSH ESXI Shell Enable ESXi

You will notice that both the “ESXi Shell” and “SSH” services are listed under the Security Profile, though when taking a look in the “Firewall” section of the Security Profile window that there is no mention on the “SSH Server” daemon being allowed through the firewall of the ESXi host.  This indicates that it is most likely not currently enabled.

Check ESXi FW and Services

To start the “ESXi Shell” and “SSH” services first click on the “Properties…” option.

VMware ESXi 5.1 Enable Shell SSH Services

You will now be presented with a “Remote Access” popup window in which you’ll see both an “ESXi Shell” and “SSH” service entry.  Notice that they are both at a “Stopped” status.  To start these services, highlight one of them with your mouse and then click the <Options> button.

VMware ESXi SSH Shell

You’ll notice that there are three “Startup Policy” options available, what one you select is up to how and when you want that particular service to stop/start.  In this instance I’m going to set it to “Start and stop manually”.  Click the <Start> button, and then the <OK> button to start the service.  Perform the same steps to start the “SSH” service.

Start ESXi Services

Once back at the “Security Profile” window you’ll now see that both the “SSH” and “ESXi Shell” services are now running.

ESXi SSH Shell Enable vSphere

From the main “Security Profile” screen notice how the “SSH Server” has been allowed through the firewall.

Firewall SSH 5.1 enable

Well that’s it, two simple methods for enabling SSH and/or ESXi Shell access to your VMware vSphere ESXi host.  Both methods perform the same task though which one you use will no doubt be determined by your own preference or what ESXi interface you have access to at the time.

Hope you found this basic post of use.

  • Prabhu

    Good One

    • http://techhead.co/ Simon Seagrave (TechHead)

      Glad it was of help. :)