michael
asked Oct 31 2021
Answer
Use AWS Systems Manager Session Manager
- Open the AWS Systems Manager console.
- Start a session.
To disable firewalls and restart the SSH service, run the following commands.
sudo iptables -F
sudo service sshd restartVerify that the SSH tcp port (22) is in a listening state.
sudo netstat -tnlp | grep :22 tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 849/sshd tcp6 0 0 :::22 :::* LISTEN 849/sshd
- Terminate the session.
- Connect to the instance using SSH.
linuxhelp
asked Oct 31 2021
Connection refused" errors when trying to connect to my EC2 instance with SSH.
I am receiving Connection refused errors when trying to connect to my EC2 instance with SSH. How do I resolve this?