ESX ships with SSH enabled by default – so it may come as a surprise that it’s not actually possible to login from a remote station out of the box :o┬áTo enable remote logins we need to make a change to the ssh daemon config file, and restart the ssh service.

Why would you want to do this? Well chances are you already use DRAC or iLO for quick access to the service console on your esx box and chances are you’ve already got annoyed by the limited view screen space when comparing vswitch, port group and pnic configs.

#Move Context to the SSH Config Directory
[root@yourbox ]#
cd /etc/ssh

#Make a backup of the config file :)
[root@yourbox ]#cp sshd_config sshd_config.bkup

#Use sed to substitute the config string no with yes
[root@yourbox ]#
sed ‘s/PermitRootLogin no/PermitRootLogin yes/’ sshd_config > sshd_config

#Restart SSH so it picks up the config change
[root@yourbox]#
service sshd restart

sed is a very flexible stream editor but I mainly use it for substituting strings; more info on sed can be found on the oracle site

You might want to switch remote logins off when you’re not using SSH.