VMware Cloud Community
racom
Enthusiast
Enthusiast
Jump to solution

SSH enabled but can't access

I've enabled SSH on ESXi 5.1.0 host but I can't access it. No open port 22 is visible via nmap contrary to other host I can access. Is any other way how to enable SSH? I can't reboot the host in the moment.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
SatyS
Hot Shot
Hot Shot
Jump to solution

Hope you are enabling the ssh as mentioned below

Enable SSH and ESXi Shell for ESXi 5.1 host ~ VMware Arena

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

View solution in original post

Reply
0 Kudos
15 Replies
vmroyale
Immortal
Immortal
Jump to solution

Assuming same network config for both hosts, have you tried restarting SSH?

/etc/init.d/SSH restart

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
racom
Enthusiast
Enthusiast
Jump to solution

Thanks for quick answer.

I've accessed local ESXi Shell and restarted /etc/init.d/SSH but no change.

I can't see sshd via "ps|grep ssh' as on other host. /var/run/inetd.conf looks the same:

# Remote shell access

ssh      stream   tcp   nowait   root   /usr/lib/vmware/openssh/bin/sshd       sshd ++group=host/vim/vimuser/terminal/ssh -i

ssh      stream   tcp6  nowait   root   /usr/lib/vmware/openssh/bin/sshd       sshd ++group=host/vim/vimuser/terminal/ssh -i

# VMware authentication daemon

authd   stream    tcp   nowait   root   /sbin/authd           authd

authd   stream    tcp6  nowait   root   /sbin/authd           authd

Reply
0 Kudos
akkayyakapisett
Enthusiast
Enthusiast
Jump to solution

Check /etc/host.deny

and place # Any : Any and do

service sshd restart

service network restart

Venkat

http://www.peeradmin.com

Reply
0 Kudos
racom
Enthusiast
Enthusiast
Jump to solution

No /etc/host.deny file on both hosts. Not running sshd is the problem. I'm searching logs but no hit yet.

Reply
0 Kudos
SatyS
Hot Shot
Hot Shot
Jump to solution

Just check whether 'lockdown mode' is enabled..

If lockdown mode is enabled,if you are trying to do ssh,it will show "Access Denied" message.

Is this what you are getting?

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

Reply
0 Kudos
racom
Enthusiast
Enthusiast
Jump to solution

Lockdown mode is disabled on both hosts. I've enabled SSH on both of them but I can access and I can see sshd running only on one of them. /etc/init.d/SSH restart makes the same changes in /var/run/inetd.conf on both hosts but I can't find log messages about sshd restart.

Reply
0 Kudos
SatyS
Hot Shot
Hot Shot
Jump to solution

Is this host having any network connectivity issues?

Are you able to access the host through VIClient?

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

Reply
0 Kudos
racom
Enthusiast
Enthusiast
Jump to solution

No connectivity problem with this host. It's a part of two node HA cluster where other node loose connection and I can't reconnect it. I wanted to compare config files so I enabled SSH.

Reply
0 Kudos
SatyS
Hot Shot
Hot Shot
Jump to solution

Can you check whether the firewall is blocking ssh?

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

Reply
0 Kudos
racom
Enthusiast
Enthusiast
Jump to solution

No firewall. Not starting sshd is the reason. But I don't know why sshd doesn't start and I can't find error messages.

Reply
0 Kudos
SatyS
Hot Shot
Hot Shot
Jump to solution

Hope you are enabling the ssh as mentioned below

Enable SSH and ESXi Shell for ESXi 5.1 host ~ VMware Arena

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

Reply
0 Kudos
racom
Enthusiast
Enthusiast
Jump to solution

Bingo! You were right. Hosts internal firewall was the reason. I can't change it via console but via using "old" vSphere Client. Thanks.

It looks like this setting blocks sshd to start. But no warning message Smiley Sad

Reply
0 Kudos
SatyS
Hot Shot
Hot Shot
Jump to solution

Happy to hear your issue is resolved.

-SatyS

If you find this useful,please mark the answer as correct/helpful

Regards,
SatyS
http://myvirtuallearning.wordpress.com/

Reply
0 Kudos
Mdmohiuddinchy
Contributor
Contributor
Jump to solution

what is the solution?

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Mdmohiuddinchy

If you have a similar issue as in this 9 years old discussion, please consider to open a new discussion, and provide details.

André

Reply
0 Kudos