I created an ec2 instance for use as a web server.
I installed LAMP using taskkel once i SSHed in.
After disconnecting and trying to reconnect I get “connection refused.”
After doing some research, it would seem that installing LAMP has made it so that the SSH daemon does not start.
All the advice says to detach the volume and attach it to another instance to correct the problem.
This is all well and good, but I cant work out how to find what the issue is. The research I did indicated that there was some output from some command that would indicate what the issue is that prevents the SSH daemon from starting.
So, how do I find the issue so I can fix it?
If you attach the EBS to some other instance then you should be able to look at the log files (/mnt/wherever/var/log/messages) or wherever your system was storing them when it was up.
Another approach would be to use the chroot command to start a shell from within the directory on which you’ve mounted up this EBS. From there you can attempt to run all of the commands that should be run during the start-up sequence … and find out why your sshd is failing … or if the remote system somehow messed up the networking or the keys such that it’s preventing your access.