ESX4 – Grant Root User SSH Access


for ESXi click here

KB ID 0000278 Dtd 12/06/10


ESX is built on Linux - and in the Linux environment, to root user is denied SSH access, there are valid security reasons for this, and you can SSH to the ESX box as a normal user and then issue the "su -" command to switch to root access.

However, some of us still want to SSH in as root, here's how to do it.


1. Create a user on your ESX Server (Ensure the user is granted "Shell access").

esx add user

2. Connect to your ESX server via SSH (using PuTTy) with the credentials you created above.(Note: if using another SSH client, use SSH2).

putty ssh to esx

3. Execute the following command,

su -

4. Give it the root password.

esx logon as root

5. Execute the following command,

cd /etc/ssh

esx ssh directory

6. Execute the following command,

nano sshd_config

7. Locate the line saying PermitRootLogin no and change it to Yes (Note: Use the arrow keys).

esx allow ssh

8. Type CTRL+X answer Y for Yes > Then press Enter to confirm.

vi editor esx

9. Execute the following commands,

service sshd restart
esxcfg-firewall -e sshServer
esxcfg-firewall -e sshClient

esx restart ssh

Related Articles, References, Credits, or External Links


Author: Migrated

Share This Post On