- Le plus récent
- Le plus de votes
- La plupart des commentaires
Now fixed.
I created a new instance with default settings which happened to be in the correct availability zone.
I was then able to stop the original instance and detach the volume, then attach it to the new instance as /dev/sdb. In Linux on the new instance I mounted /dev/sdb2
on /mnt/sdb2 and edited /mnt/sdb2/etc/ssy/sshd_cconfig.
I then unmounted /mnt/sdb2, detached the volume from the new instance, attached it to the original instance and restarted it.
However, I did not realize that the external IP address had changed, so I still could not login. EC2 connect was not working even though in theory I still had the same keypair, but I was able to repeat the detach/attach/edit process and enable password login. I was then able to login on the internal address from the new instance, and, realizing my mistake, login from the internet using my key.
Update - It occurs to me that I could have made other changes while the volume was mounted on the other instance, such as enabling password logins, or adding other SSH keys to .ssh/authorized_key etc., to let me login from older hosts that might have SSH algorithm incompatibilities.
I still have an issue with keys for EC2 connect for another question.
Hello.
I suspect that the problem is probably due to a change in the SSH settings.
Therefore, as described in the document below, stop the EC2 that is currently experiencing the problem, detach the root volume, and then attach it to the normal EC2 and restore the SSH settings to the original.
After that, if you attach the root volume to the original EC2 and start it, you may be able to connect via SSH.
https://repost.aws/knowledge-center/ec2-instance-boot-issues
Alternatively, you may want to try changing the EC2 settings so that you can connect via serial console.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console-prerequisites.html
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- Comment puis-je vérifier si mon instance EC2 exécutant Linux a démarré en mode UEFI ou BIOS hérité ?AWS OFFICIELA mis à jour il y a 8 mois
- AWS OFFICIELA mis à jour il y a 3 ans
Yes. I took a snapshot of the image, created a volume from that and attached it to another instance. Then I could see the syslog. I had mis-spelled VERBOSE. However, the other instance is in another availability zone; I was able to copy the snapshot to the other zone.
It might be a good idea to set the user data to use something like the "sed" command to remove "LogLevel VERBOSE". https://repost.aws/knowledge-center/execute-user-data-ec2