SSH connection refused

0

I have centos ec2 instance and suddenly i am not able to connect to instance and having error SSH connection refused. i have already checked the firewall that allowing all traffic.

jerry
demandé il y a 7 mois893 vues
2 réponses
0

Hello Jerry,

Good day. could try few suggestions -

  1. 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.
  2. 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 using sudo systemctl restart sshd.
  3. 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

AWS
EXPERT
Ben Lee
répondu il y a 7 mois
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.

profile picture
EXPERT
répondu il y a 7 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions