This article shows how to quickly enable SSH service on one, more or all hosts in a cluster.
Start service
Login to vCenter.
Connect-VIServer <myVC>
The command below will activate SSH on all hosts registered in in your vCenter.
Get-VMHost | Get-VMHostService | Where Key -EQ "TSM-SSH" | Start-VMHostService
TSM means “Technical Support Mode”
Stop SSH service
To stop SSH service on all hosts, use the command below.
Get-VMHost | Get-VMHostService | Where Key -EQ "TSM-SSH" | Stop-VMHostService -Confirm:$False
Selective activation
It’s possible to limit the scope of the command to one host. Just add the FQDN after Get-Host.
Get-VMHost myESX.myDomain.local | Get-VMHostService | Where Key -EQ "TSM-SSH" | Start-VMHostService