Ask Your Question
0

Why does the ssh login fail and show the message "debug1: update_known_hosts: known hosts file ~/.ssh/known_hosts2 does not exist"?

asked 2022-04-13 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-01-06 16:00:00 +0000

nofretete gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-04-13 11:00:00 +0000

Seen: 10 times

Last updated: Jan 06 '23