5.4 Ensure SSH is disabled

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The ESXi shell, when enabled, can be accessed directly from the host console through the DCUI or remotely using SSH. Disable Secure Shell (SSH) for each ESXi host to prevent remote access to the ESXi shell, and only enable SSH when needed for troubleshooting or diagnostics.

Rationale:

Remote access to the host should be limited to the vSphere Client, remote command-line tools (vCLI/PowerCLI), and through the published APIs. Under normal circumstances, remote access to the host using SSH should be disabled.

Impact:

Disabling SSH may impact the ability to complete assessments with some third-party tools and may need to be temporarily enabled for these tools to function.

Solution

To disable SSH, perform the following:

From the vSphere web client, select the host.

Select 'Configure' -> 'System' -> 'Security Profile'.

Scroll down to 'Services'.

Click 'Edit...'.

Select 'SSH'.

Click 'Stop'.

Change the Startup Policy to 'to Start and Stop Manually'.

Click 'OK'.

Alternately, use the following PowerCLI command:

# Set SSH to start manually rather than automatically for all hosts
Get-VMHost | Get-VMHostService | Where { $_.key -eq 'TSM-SSH' } | Set-VMHostService -Policy Off

See Also

https://workbench.cisecurity.org/files/3511