1 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.
Your Answer