Known Hosts ECDSA Host Key Multiple Domains on One IP

Posted by Jonah on Server Fault See other posts from Server Fault or by Jonah
Published on 2012-08-30T18:19:40Z Indexed on 2012/08/30 21:40 UTC
Read the original article Hit count: 281

Filed under:
|
|
|
|

Hello, world!,

I have a VPS set up with multiple domain names pointing to it. Arbitrarily, I like to access it via SSH through the domain name I'm dealing with. So for example, if I'm doing something with example1.com, I'll log in with ssh [email protected], and if I'm working with example2.com, I'll log in with ssh [email protected]. They both point to the same user on the same machine. However, because SSH keeps track of the server's fingerprint, it tells me that there is an offending host key, and makes me confirm access.

$ ssh [email protected]
Warning: the ECDSA host key for 'example2.com' differs from the key for
the IP address '123.123.123.123'
Offending key for IP in /home/me/.ssh/known_hosts:33 
Matching host key in /home/me/.ssh/known_hosts:38
Are you sure you want to continue
connecting (yes/no)?

Is there a way to ignore this warning? Thanks!

© Server Fault or respective owner

Related posts about ssh

Related posts about domain