2 Answers
- Newest
- Most votes
- Most comments
0
Hello Jerry,
Good day. could try few suggestions -
- Check the security group rules are allowing inbound traffic on port 22 from your IP address. (can be your laptop, your local ec2 server etc). Reconfirm SSH is allowed in the security group.
- Double check to see SSH service is running on the instance. Run
sudo systemctl status sshd
to see if its active. Try restarting if needed usingsudo systemctl restart sshd
. - Also check, that the daemon is listening on port 22. Run
sudo netstat -ant | grep 22
to see if its active and listening.
Hope this helps, kindly try it out and upvote if works. :) Thanks
0
Hi,
I recommend taking a look at the following Knowledge Center article which describes step by step how to debug "Connection refused" or "Connection timed out" errors when trying to connect to an Amazon EC2 instance using SSH.
I hope this helps you.
Relevant content
- asked 2 years ago
- asked 5 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago