I have an instance of Ubuntu created in AWS, I have generated the .pem
to connect with SSH in the following way:
ssh -i my_key.pem user @ ip
My surprise is that I was able to connect from the terminal of my Mac the first time but if I want to connect again it tells me the following:
ssh -i mi_key.pem usuario@ip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
9f:24:59:52:38:78:de:9f:bb:f1:e0:69:3e:b1:5b:af.
Please contact your system administrator.
Add correct host key in /Users/sergio/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/sergio/.ssh/known_hosts:31
RSA host key for "ip" has changed and you have requested strict checking.
Host key verification failed.