Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The message "debug1: updateknownhosts: known hosts file ~/.ssh/known_hosts2 does not exist" indicates that the SSH client is attempting to update the list of known hosts, but it cannot find the file that contains the list. This can happen for several reasons, including:

  1. The file does not exist: The file ~/.ssh/known_hosts2 does not exist in the user's home directory, which means that the user has not connected to any SSH servers before.

  2. The file has been deleted: The file ~/.ssh/known_hosts2 may have been accidentally deleted or removed by the user, which means that the SSH client cannot update the list of known hosts.

  3. The file has been moved or renamed: The file ~/.ssh/known_hosts2 may have been moved to a different location or renamed by the user, which means that the SSH client cannot find the file to update the list of known hosts.

To resolve this issue, the user can create a new file ~/.ssh/known_hosts2 or rename/move the existing file to its original location. Alternatively, the user can disable the strict host key checking feature by setting the "StrictHostKeyChecking" option to "no" in the SSH configuration file (~/.ssh/config). However, this may pose a security risk as it allows connections to any host without verifying its identity.