EC2 Instance Launched from AMI Unavailable (ssh) After Start / Stop or Reboot

When we start the instance from AMI. First instance is available (ssh). After we stop / start the instance or restart it, the machine will become unavailable via ssh, but we can execute it. The following is an error in the system log.

AMI ID used - ami-72dc9220 Instance - i-0896a15f - Linux rhel6.4 M1.large instance. ../ ******************* BLKFRONT for device/vbd/2049 ********** backend at /local/domain/0/backend/vbd/236/2049 Failed to read /local/domain/0/backend/vbd/236/2049/feature-barrier. Failed to read /local/domain/0/backend/vbd/236/2049/feature-flush-cache. 14680064 sectors of 512 bytes ************************** Thread "kbdfront": pointer: 0x21e0130010, stack: 0x3720000 FBFRONT for device/vfb/0 ********** KBDFRONT for device/vkbd/0 ********** Failed to read device/vfb/0/backend-id. Failed to read device/vkbd/0/backend-id. Error ENOENT when reading the backend path device/vkbd/0/backend Thread "kbdfront" exited. Error ENOENT when reading the backend path device/vfb/0/backend ./ 
+6
source share
2 answers

Cleverly fix it. This is due to an error from REDHAT for instances of 6.4 rhel . After starting the machine from AMI, connect to the machine and switch to the root user and make changes to the /etc/rc.d/rc.local ...

Delete the following three lines and save the file:

 cat <<EOL >> /etc/ssh/sshd_config UseDNS no PermitRootLogin without-password ../ 

You should also delete the junk entries from the /etc/ssh/sshd_config file.

After rebooting, the device will reboot.

+8
source

Also comment the following lines in /etc/ssh/sshd_config

 permitrootlogin without-password permitrootlogin without-passwordUseDNS no 
+1
source

Source: https://habr.com/ru/post/948055/


All Articles