Search the VMware Knowledge Base (KB)
View by Article ID

SSH connection after upgrading to ESXi 5.0 fails with the auth.log error: Could not load host key (2010607)

  • 4 Ratings

Symptoms

  • After upgrading hosts from ESXi 4.1 to 5.0 and when using Private Keys, you cannot establish an SSH connection to the hosts
  • This issue occurs even though:
    • SSH is enabled on the hosts
    • SSH port 22 is accessible
    • No firewall is enabled

  • The /var/log/auth.log file displays these messages on the ESXi host:

    sshd[197442]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
    sshd[197442]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
    sshd[197442]: Disabling protocol version 2. Could not load host key
    sshd[197442]: sshd: no hostkeys available -- exiting.
    login[197808]: pam_per_user: create_subrequest_handle(): doing map lookup for user "root"
    login[197808]: pam_per_user: create_subrequest_handle(): creating new subrequest (user="root", service="system-auth-generic")
    login[197808]: pam_unix(system-auth-generic:session): session opened for user root by (uid=0)
    login[197808]: root login on 'char/tty/1'

Cause

If you previously used Private Keys for authentication, the keys are no longer valid after upgrading.

Resolution

To generate a new key pair::
  1. Access the ESXi host command line from the DCUI. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).
  2. cd to /usr/lib/vmware/openssh/bin/.
  3. Run these commands:
# ./ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
# ./ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

Note: You are prompted for a passphrase. Passphrases are optional when generating SSH private keys. For more information, see Allowing SSH access to ESX hosts with public/private key authentication (1002866).

See Also

Update History

04/26/2013 - Added ESXi 5.1.x to Products

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.

Feedback

  • 4 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 4 Ratings
Actions
KB: