Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an instance on EC2 that I think I Stopped at one point or another. When I restart it and tried to ssh in, I got those messages about the host key having changed. But why?

Is it because the Elastic IP I'd associated with the instance had to be remapped to it?

Shouldn't the host key be generated once, and not be regenerated on the same host?

share|improve this question
up vote 1 down vote accepted

The ssh key is never regenerated on the same host.

You are seeing this message because you previously had your Elastic IP connected to a completely different instance.

share|improve this answer
I don't see how I got mixed up here, but I must have. – Ladlestein Aug 3 '14 at 18:50
Actually, I just detached a root volume and attached it to another machine, to fix a dumb firewall mistake that locked me out. When I re-attached, the host keys had changed, as proven by the mtimes. A normal stop/start doesn't do that; I tested it. – Halfgaar Apr 22 '15 at 13:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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