EC2 instance launched from AMI not reachable(ssh) after start/stop or reboot

我只是一个虾纸丫 提交于 2019-12-04 07:36:24
Ashwani Kumar

Was able to fix this. This is due to a bug from REDHAT for 6.4 rhel instances. After launching the machine from an AMI, connect to the machine and switch to root user and make below changes to /etc/rc.d/rc.local file ...

Remove the following three lines and save the file:

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

One should also remove garbage entries from /etc/ssh/sshd_config file.

The machine once rebooted after these changes works fine.

Balaji Thanigaiarasu

Also comment following lines in /etc/ssh/sshd_config

permitrootlogin without-password
permitrootlogin without-passwordUseDNS no
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!