Answer the question
In order to leave comments, you need to log in
How to fix port 22: Connection refused ( ssh )?
[email protected]:~/Numero_Project/poliv/src$ ssh [email protected]
ssh: connect to host ssh.pythonanywhere.com port 22: Connection refused
Answer the question
In order to leave comments, you need to log in
This is your outgoing connections to ssh. Check your firewall settings first.
$ ssh -P22 ssh.pythonanywhere.com
The authenticity of host 'ssh.pythonanywhere.com (23.21.200.247)' can't be established.
RSA key fingerprint is SHA256:<some key>.
Are you sure you want to continue connecting (yes/no)? no
There is really nothing to try here.
1) Or you have a firewall. "sudo iptables -L -vn" will help. Regardless of what ufw or other shells answers.
2) Or you have a network such that outgoing connections to the 22nd port are blocked on some kind of equipment (questions to the one who administers the network). You can run "tcpdump -i eth0 -n port ssh or icmp" in one tab. On the second try to connect via ssh. See who sends the same "connection refused".
99% chance this is the problem.
What if the problem is from Gitlab-CI? Moreover, the task generally works - but if you combine 2 identical commands for 2 site sites in one gitlab-ci, then the second one does not work with this error ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question