04 April 2023

Can not connect sftp - "Warning: Permanently added to the list of known hosts"

https://stackoverflow.com/questions/9299651/git-says-warning-permanently-added-to-the-list-of-known-hosts

Create a ~/.ssh/config file and insert the line:

UserKnownHostsFile ~/.ssh/known_hosts

You will then see the message the next time you access Github (or any other sftp server), but after that you'll not see it anymore because the host is added to the known_hosts file. This fixes the issue, rather than just hiding the log message.

No comments:

Post a Comment