VMware Cloud Community
homeboy
Contributor
Contributor
Jump to solution

Unable to log into ssh console

Is is possible for the "root" account to be locked some how? I am trying to log into the console but I am unable to use root; "access is denied"

is there a way to change this access or reset the password? Or, is there another user account that can be used that has admin privileges ?

Reply
0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

By default root access using SSH is disabled for security reasons. It's generally recommended not to enable this but if you want to do this follow the below steps. An alternate method is to create another non-root account and use "su -" to elevate the account to root privileges.

How do I enable root access for SSH? - This is generally not recommended because of security risks which is why it is disabled by default, but if you have to do it here are the steps:

• Login to service console

• Edit /etc/ssh/sshd_config with Nano or Vi

• Change PermitRootLogin to yes (or comment out the line with a #)

• Save & exit

• Type "service sshd restart"

Also this white paper has info on how to do this without enabling root access for SSH.

Accessing VMware ESX Server 3 securely using SSH and SUDO -

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website:

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

View solution in original post

Reply
0 Kudos
8 Replies
esiebert7625
Immortal
Immortal
Jump to solution

By default root access using SSH is disabled for security reasons. It's generally recommended not to enable this but if you want to do this follow the below steps. An alternate method is to create another non-root account and use "su -" to elevate the account to root privileges.

How do I enable root access for SSH? - This is generally not recommended because of security risks which is why it is disabled by default, but if you have to do it here are the steps:

• Login to service console

• Edit /etc/ssh/sshd_config with Nano or Vi

• Change PermitRootLogin to yes (or comment out the line with a #)

• Save & exit

• Type "service sshd restart"

Also this white paper has info on how to do this without enabling root access for SSH.

Accessing VMware ESX Server 3 securely using SSH and SUDO -

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website:

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Reply
0 Kudos
homeboy
Contributor
Contributor
Jump to solution

not to sound to dumb here but if I can not use "root" to log into the service console using putty which account can I use?

Also, this is the only VMHost that I can not log into for some reason. All of the others , 16, I have used 'root' and I never enabled anything.

Reply
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

In ESX3 this is disabled by default, you have to change the setting or there is no way to login via SSH using root, you can still log in using root at the physical console. You can use the VI Client connected direct to ESX to create a new user called SSHUSER or something or you can do it through the SC command line using the useradd command.

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=8375637&sl...

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Reply
0 Kudos
homeboy
Contributor
Contributor
Jump to solution

OK, I guess this is where I am confused.

Would this "root" user have the same password as I enter during the host OS install?? For my other VM's I have been connecting to the SSH console using 'root' and I use the password I entered during that setup and I never enabled it, never created another user.....

Reply
0 Kudos
sbeaver
Leadership
Leadership
Jump to solution

Would this "root" user have the same password as I enter during the host OS install?? Yes it is the account that you used to set this up during the install. ESX just has root access via ssh disabled by default so you can add another non root account to access and then su - to root or enable root access via ssh in the /etc/sshd/ folder

Steve Beaver

VMTN Forum Moderator

*Virtualization is a journey, not a project.*

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
Reply
0 Kudos
homeboy
Contributor
Contributor
Jump to solution

Thanks Eric, Steve,

I just don't understand how I can log into the SSH console using 'root' on 15 VM's and not the particular one since I did not enable this in the first place. But I've gotten around this one for now thanks to your suggestions.

Reply
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

I'm not sure why your other servers did not have this same behavior. Did you use any custom install media or kickstart scripts when installing the other servers? Is it possible another admin changed this setting on the other servers?

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website:

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Reply
0 Kudos
homeboy
Contributor
Contributor
Jump to solution

No custom install, just used the ISO image.

I'm the only one who knows how to build the VM's, job security. Smiley Wink

I have no idea why they work either, it is strange, I'm going to create an account for each of them as you suggested just incase the 'root' login stops working when I need it.

Thanks again for your help!

Reply
0 Kudos