How to configure ssh to stop perpetually giving you a ‘known hosts’ warning for the same hosts

Whenever I used ssh, I would constantly be getting warnings like this:

Warning: Permanently added ',' (RSA) to the list of known hosts.

The warning would show up even when I was connecting to a host and IP address I’d connected to previously.

The solution was to add the following line to my ~/.ssh/config file…

UserKnownHostsFile ~/.ssh/known_hosts

(Turns out I did have a UserKnownHostsFile configuration entry, but for some reason it was set to /dev/null.)

All better.

(HT: StackOverflow)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.