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


You must be logged-in to post a comment. Log-in/Register

Rick Vanover  |   Nov 6 2007   8:14PM 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:16PM GMT

Very true - Great point - Thanks Rick!

-David


 

Slowe  |   Nov 9 2007   8:39PM 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:56PM 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


 

ESX 3i is rocking it on the skinny — Server Virtualization Blog  |   Nov 13 2007   11:27PM GMT

[...] This, of course, is excepted when VMWare documentation gives Linux commands to perform tasks, David Davis’ recent blog on enabling SSH and SFTP on ESX is a good example.  By removing that layer, the ESX product is more aligned to what it needs to do [...]


 

MarcB  |   Nov 14 2007   7:11PM 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.


 

Embed SSH connections to ESX with console plug-in - Virtualization Pro: A SearchVMware.com blog  |   Feb 28 2008   10:58PM GMT

[...] Installing the console plug-in is straight forward from the ConsoleClientSetup-0.1.5.msi and it is easily added from the plug-ins menu in the VIC. Once added, each ESX host in your inventory will have a new tab called Console that performs in a similar fashion that the Console tab does for virtual machines. The difference is that authentication to the ESX host is passed through the plug-in. This requires that SSH be enabled on the ESX host, and should you wish to use the root login there is a slight configuration to enable root SSH access which is explained here on the ITKE by David Davis. [...]


 


Ping123  |   Jan 15 2011   6:53AM GMT

With billow computing, workloads are assigned to connections, software and services, which pass4sure are accessed over a arrangement of servers and admission in assorted locations, collectively accepted as “the cloud.” Using a attenuate applicant or added admission point, like an iPhone or pass4sure test laptop, users can admission the billow for assets on demand.

Greene told the accident attendees that the change of virtualization begins with users deploying VMs for real pass4sure testing and development, again abatement into server consolidations for assembly environments. The third appearance is ability aggregation, with absolute abstracts centers getting pass4sure virtualized, followed by automation of all of those aggregated workloads. The final “liberation” appearance is billow computing, Greene said.


 

Smith234  |   Feb 20 2011   1:20AM GMT

Thanks for the nice blog. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.
<a href="http://www.loanmodificationlawyers.org/" rel="nofollow">loan modification</a>


 

Smith234  |   Feb 20 2011   1:21AM GMT

Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work.
loan modification


 

Losangelesselfstorage  |   Mar 29 2011   12:29AM GMT

Allowing root logins via SSH is probably not a security best practice. Los Angeles Self Storage Need to be careful with this solution.


 

Rounese  |   Apr 1 2011   2:10AM GMT

Your blog article is very intersting and fanstic,at the same time the blog theme is unique and perfect,great job.To your success.One of the more impressive blogs Ive seen. Thanks so much for keeping the internet classy for a change.Casino Paysafecard


 

Nabiha  |   Apr 7 2011   6:36AM GMT

This is a great blog with excellent posts and links.
Thanks for sharing.
mothers day flowers Peru | flowers of argentina


 

Kingston250  |   Sep 30 2011   12:43PM GMT

interesting post, through this way we easily solve this problem.i like to read informative blogs and this blog is also so good and helpful.
thanks for taking time to discus this topic..
medical-transportation-services