Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH fails after changing Amazon EC2 instance region

When I created the EC2 instance, the default region was us-west. Then when the instance is running, I changed it to us-east, and the public DNS was also changed.

However, I SSH using the new DNS in putty, and it displays server refuses the key. If I switch back to us-west region, it shows the original DNS. Does anyone know why I cannot connect EC2 using us-east?

like image 471
Sean Avatar asked May 19 '26 07:05

Sean


1 Answers

It sounds like the only way this could have happened is that if you created a similar instance in a new region. In which case your keypairs are different. You need to use the specific keypair for the region that you created it for.

like image 180
Rico Avatar answered May 20 '26 22:05

Rico