Enable SSH on vCenter Server 7

There are often times you may want to directly SSH into the vCenter Server Appliance (VCSA). Unless vCenter 7 was deployed with SSH enabled by default it is disabled.

We have a few different methods when needing to enable SSH on vCenter 7.

Method 1.
Enable via the Web Client / VAMI Interface

This method involves enabling SSH via the vCenter Server Management Interface (VAMI). This can be directly accessed via a URL over port 5480. For example (https://vcenter_fqdn_or_ip:5480/)

You can also be redirected to the VAMI from within the vSphere Client in vCenter 7. Navigate to the Menu and select Administration.

In the left pane click on System Configuration under Deployment. Then click on your vCenter node you want to enable with SSH.

A new browser window will open to the vCenter VAMI login page on port 5480. You will need to login as root.

Navigate to Access in the left pane. This will list your Access Settings. The settings can take a few seconds to appear with Enable / Disable. Wait till they appear and then select Edit.

Click the Slider button for Enable SSH Login and click OK

Method 2.
Enabling SSH via the Remote Console

This method involves opening a Remote Console or a Web Console window for the vCenter VM in the vSphere Client.

Press F2 to Customize System.

Login with your root credentials.

Navigate to Troubleshooting Mode Options.

Select Enable SSH.

Method 3.
Enabling SSH via the Shell in Remote Console

Similar to Method 2. We open a Remote Console (or Web Console) via the vSphere Client. This time we press ALT + F1 to get a TTY login session. Login as root.

Run the below commands to enable SSH.  ssh.get shows the current status. ssh.set allows you to change the state of SSH.  Use ‘false’ instead of true to disable SSH.

Command> ssh.get
Enabled: False
Command> ssh.set --enabled true
Command> ssh.get
Enabled: True
Command>

The above methods takes effect immediately, no need to reboot.  When disabling SSH, current sessions stay active and don’t end.  So if someone has an open SSH session they won’t be kicked out until they logoff or their session times out.

1 thought on “Enable SSH on vCenter Server 7”

Leave a Reply

Your email address will not be published.