2

As per title, lately I started getting the error "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" after I set up a new server in AWS. I'm on OSX Yosemite (10.10.3)

I'm aware of nearly all the methods one can take to remove this error:

  • ssh-keygen -R <ip>
  • rm ~/.ssh/known_hosts

Etcetera. I can confirm the file is deleted. I then open a new terminal and SSH in, adding the key once again to known hosts. However then if I attempt to scp into the server, I get this error again. I've even tried restarting my computer after clearing known_hosts and continuing the process then. It seems very strange whatever's going on. I've scoured the internet as best I can and I haven't managed to find anyone talking about this issue.

Anyone have any ideas as to why this might happen?

2
  • Do you get the error when you ssh in, instead of scp in? Jun 29, 2015 at 14:11
  • No, this is the bizarre thing, it does what I'd expect and asks me to add it to the hosts file..
    – gdgr
    Jun 29, 2015 at 14:22

1 Answer 1

2

What ssh options are you using? If you're not already, you should consider the following two

-o StrictHostKeyChecking=no 
-o UserKnownHostsFile=/dev/null

You can put these in your ~/.ssh/config file or use them together on the CLI.

The other thing I was wondering is could it be that your instance is terminating and re-provisioning? That would change the host id. Just a thought.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .