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 'somehost.org,111.22.33.45' (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)

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s

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