Либо у вас неправильный ключ, либо неправильный адрес экземпляра (который отклонил ваш ключ).
Если вы остановили и запустили свой экземпляр, ваш общедоступный IP-адрес и имя хоста изменятся. Даже если вы используете ElasticIP, его «остановка» приведет к отключению EIP.
Вернитесь в консоль AWS и посмотрите, что такое новый общедоступный IP-адрес / имя хоста. Возможно, вы пытаетесь подключиться к старому DNS-имени, которое, вероятно, сейчас назначено другому экземпляру.
лучше, потому что в вашем случае будет больше ошибок, чтобы удалить ошибочный ключ хоста с помощью
ssh-keygen -R hostname
ssh-keygen -R ec2-184-73-22-113.compute-1.amazonaws.com
Если вы уверены, что ваш секретный ключ правильный, вы также можете проверить сервер, у которого .ssh / authorized_keys
есть необходимые разрешения ( 700
для .ssh /
, 600
для .ssh / authorized_keys
)
When you stop a running instance, the following happens:
The instance performs a normal shutdown and stops running; its status changes to stopping and then stopped.
Any Amazon EBS volumes remain attached to the instance, and their data persists.
Any data stored in the RAM of the host computer or the instance store volumes of the host computer is gone.
EC2-Classic: We release the public and private IP addresses for the instance when you stop the instance, and assign new ones when you restart it.
EC2-VPC: The instance retains its private IP addresses when stopped and restarted. We release the public IP address and assign a new one when you restart it.
You instance must have got New Public IP . Please check and try to login to your server with new IP .