VMware Cloud Community
jkoelker
Contributor
Contributor
Jump to solution

SSH with root not working on new ESX 4.0 update 2 install

I just installed ESX 4.0 update 2 on two brand new HP servers. Everything is working fine with the exception of SSH access on the root account. I have verified in the User and Groups in Virtual Center that Root is setup for Shell access but when I try to SSH it tells me access denied. I am using the same password to try and SSH that I use when I login as root on the Virtual Center so I know the password is correct. One other way this is affecting me is my backups. I use Vranger and that needs SSH access to the ESX box and currently it can't access them because of the failure with SSH. Anything I am missing? I have the firewall settings setup for incoming and outgoing SSH port 22 connections to be allowed on the Virtual Center Security Profile section. Thanks for any help you can provide.

Reply
0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal
Jump to solution

check /etc/ssh/sshd_config toward the bottom.. Is permit root login set to yes?

View solution in original post

Reply
0 Kudos
6 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

check /etc/ssh/sshd_config toward the bottom.. Is permit root login set to yes?

Reply
0 Kudos
jkoelker
Contributor
Contributor
Jump to solution

It was set to No on both ESX boxes so I have changed that file on both servers and saved the file. It now looks like this:

PermitRootLogin yes

I tried using putty on port 22 to access the ESX box via root and it still says access denied.

I created a new user and gave them shell access and can ssh in with that user with no issues. I can then sudo into root. Any ideas. Thanks for the help.

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

you need to restart the service... Issue

/etc/init.d/sshd restart

jkoelker
Contributor
Contributor
Jump to solution

Am I doing something wrong while trying to restart this service?

[root@esx14 init.d]# sshd restart
bash: sshd: command not found

[root@esx14 init.d]# sshd stop
bash: sshd: command not found

Reply
0 Kudos
jkoelker
Contributor
Contributor
Jump to solution

Never mind I got it. I ran the command service sshd restart at the console and it was fine.

That has fixed my issues. Thanks for the help.

Reply
0 Kudos
rickardnobel
Champion
Champion
Jump to solution

Beware some changes in SSH access in later releases, I think it is ESX 4.1, then to be able to SSH in at all you must have the Administrator Role on the local ESX, so no normal account can log on and do su/sudo.

In ESXi 4.1, if having enabled SSH, the root account can login however.

My VMware blog: www.rickardnobel.se
Reply
0 Kudos