Virtualization Pro

Nov 5 2007   9:10PM GMT

How to allow the root user to log in to VMware ESX Server with SSH



Posted by: David Davis
Virtualization, VMware ESX

Let’s say that you just installed a new VMware ESX server. You tried to add SSH to it and log in as root. What happened?

It didn’t work, did it?

The firewall allows it, right? You can log in to the physical server console with the same username and password, right? But it still doesn’t work, does it?

Let’s find out how to fix it….

To allow the root user to log in to a VMware ESX Server over the network using SSH, do the following:

  1. Go to the service console on the physical server and log in
  2. vi /etc/ssh/sshd_config
  3. Change the line that says PermitRootLogin from “no” to “yes”
  4. Do service sshd restart

And your problem is solved…

No need to thank me, just subscribe to our Virtualization Pro blog instead! :)

David Davis, VCP, CCIE

Personal Website: HappyRouter.com
VMware Videos by David Davis:
VMware Server & Workstation
VMware ESX Server

Comment on this Post

Leave a comment:

Rick Vanover  |   Nov 6, 2007  8:14 PM (GMT)

This also enables SFTP – you can use your FTP client that supports file transfer over SSH to move stuff to the filesystem of the ESX server.


 

Davis420  |   Nov 6, 2007  8:16 PM (GMT)

Very true – Great point – Thanks Rick!

-David


 

Slowe  |   Nov 9, 2007  8:39 PM (GMT)

David,

I’m sure it goes without saying that allowing root logins via SSH is not considered a security best practice, but this is helpful information for users not familiar with SSH configuration. Over the long term, I imagine you would agree that users should create non-privileged accounts to use with SSH, then use su or sudo once they have logged into the console.


 

Davis420  |   Nov 9, 2007  8:56 PM (GMT)

Hi SLowe,

I completely agree – the proper way is to login as yourself then su to root. Great point!

Thanks for the comment,
David


 

MarcB  |   Nov 14, 2007  7:11 PM (GMT)

Hi David,
I am giving training on ESX and I have found RootAccess from Veeam.com to be a compromise (sort of speak). It is an easy, free and light Windows tool and it can toggle PermitRootLogin if necessary but mostly it eases the creation of users. My students now have no excuse to maintain good audit pratices.