This article outlines steps to login to an ESX host as the root user using a Secure Shell (SSH).
Since ESX 3.0, for increased security, SSH is disabled by default for the root
account on an ESX host. That is, the actual sshd service does not allow root logins. Non-root users are able to login with SSH. This is another layer of protection in addition to the host firewall.
Note: Each SSH connection to an ESX host uses additional Service Console resources. Use caution when using scripts or third party software that create multiple SSH sessions to the ESX Service Console. Excessive use of SSH on an ESX machine may cause the service console to exhibit symptoms of memory exhaustion.
To enable root login for SSH and SCP clients:
su -
Note: If you do not have any other users on the ESX host, you can create a new user by connecting directly to the ESX host with VMware Infrastructure (VI) or vSphere Client. Go to the Users &Groups tab, right-click on the Users list and select Add to open the Add New User dialog. Ensure that the Grant shell access to this user option is selected. These options are only available when connecting to the ESX host directly. They are not available if connecting to vCenter Server.nano /etc/ssh/sshd_config
PermitRootLogin
and change the no
to yes
. You can find this line about 2 pages down from the top.service sshd restart
Note: Alternatively, use the command:/etc/init.d/sshd restart