Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
Unable to connect to ESXi host using SSH (2041660)
Symptoms
- Unable to connect to an ESXi host using SSH although SSH is enabled
- Error while connected through SSH: Server unexpectedly closed network connection
- /var/log/auth.log contains:
2012-12-16T23:46:00Z sshd[636556]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2012-12-16T23:46:00Z sshd[636556]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
2012-12-16T23:46:00Z sshd[636556]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2012-12-16T23:46:00Z sshd[636556]: error: Permissions 0644 for '/etc/ssh/ssh_host_dsa_key' are too open.
2012-12-16T23:46:00Z sshd[636556]: error: It is recommended that your private key files are NOT accessible by others.
2012-12-16T23:46:00Z sshd[636556]: error: This private key will be ignored.
2012-12-16T23:46:00Z sshd[636556]: error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
2012-12-16T23:46:00Z sshd[636556]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
2012-12-16T23:46:00Z sshd[636556]: Disabling protocol version 2. Could not load host key
2012-12-16T23:46:00Z sshd[636556]: sshd: no hostkeys available -- exiting.
2012-12-16T23:46:00Z sshd[636556]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
2012-12-16T23:46:00Z sshd[636556]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2012-12-16T23:46:00Z sshd[636556]: error: Permissions 0644 for '/etc/ssh/ssh_host_dsa_key' are too open.
2012-12-16T23:46:00Z sshd[636556]: error: It is recommended that your private key files are NOT accessible by others.
2012-12-16T23:46:00Z sshd[636556]: error: This private key will be ignored.
2012-12-16T23:46:00Z sshd[636556]: error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
2012-12-16T23:46:00Z sshd[636556]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
2012-12-16T23:46:00Z sshd[636556]: Disabling protocol version 2. Could not load host key
2012-12-16T23:46:00Z sshd[636556]: sshd: no hostkeys available -- exiting.
Cause
The SSH private key should not be accessed by any other user or group than root for security reasons.
Resolution
1. Login to the local shell on the ESXi host using Remote Console tools.
2. Modify the private key permission at /etc/ssh/ to 600 using the command:
# chmod 600 /etc/ssh/ssh_host_rsa_key
3. Restart the sshd service on the host using the command:
# ./sbin/services.sh restart
Now you should be able to connect to the ESXi host using SSH.
See Also
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
KB:
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

