1

I have .ssh/config file in this format:

Host ABC
Hostname example.com
HostKeyAlias ABC
CheckHostIP yes
StrictHostKeyChecking no
Port 1001
User userABC

Host CDE
Hostname example.com
HostKeyAlias CDE
CheckHostIP yes
StrictHostKeyChecking no
Port 1002
User userCDE

The hostname is the same but based on PORT# the firewall redirects the access to the correct predefined host. Everything is working except:

  1. Warning: Permanently added 'ABC,example.com' (RSA) to the list of known hosts. this happens every single time
  2. known_hosts files is keep on growing with duplicate entries

I don't mind the Warning itself, but I don't want the known_hosts file to grow with redundant entries!

  • Are you getting duplicate entries for each (hostname, port) pair, or one per port? – mgorven Mar 12 '13 at 17:57
  • Yes. multiple host entries for each alias e.g.: ABC ssh-rsa AAAAB3etc ABC,IP address ssh-rsa AAAAB3etc ABC ssh-rsa AAAAB3etc sometimes the entry apears with IP adress of the host after the comma. Don't know why. – Serge Mar 13 '13 at 0:54
1

Have you tried with CheckHostIP set to no?

I found a similar issue, and I'm just throwing this out as a thought. I'd have to setup a test to try this out, because I'm really curious now what's going on.

https://stackoverflow.com/questions/733753/how-to-handle-ssh-host-key-verification-with-2-different-hosts-on-the-same-but

  • That's exactly the article I am following in setting it up. If I set CheckHostIP to no then the connection does not work at all: $ sftp ABC Connecting to ABC... Warning: Permanently added 'ABC' (RSA) to the list of known hosts. Connection closed by xxx.xxx.xx.xxx Connection closed – Serge Mar 13 '13 at 1:00
  • sorry my bad on setting the CheckHostIP to no. It does not change the behaviour: Setting CheckHostIP to no does not change anything. $ sftp ABC Connecting to ABC... Warning: Permanently added 'ABC' (RSA) to the list of known hosts. sftp> – Serge Mar 13 '13 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.