Anything special for port 22 *outgoing*?

Hi,

I’m really struggling with this. I’m pretty sure its not Hestia specific, but I can’t work out what. sshd_config we have port 22122 for our SSH port. This all works fine

However, when trying to go “out” to another server via SSH, I get timeout issues:

ssh -v4 foo.crio.nl
OpenSSH_8.9p1 Ubuntu-3ubuntu0.6, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to foo.crio.nl [178.22.63.145] port 22.

Yet I can connect to one of my other server on port 22122:

ssh [email protected] -p 22122
[email protected]’s password:

I can see this:

iptables --list -n | grep 22
fail2ban-SSH  tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22122
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22
ACCEPT     tcp  --  178.22.63.50         0.0.0.0/0            tcp dpt:3306
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22122
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:35622
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 35621,35622,35623,55415
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22122

Has anyone got any suggestions? I’m really drawing a blank on what could be causing this - especially as the same connection works fine from my Win11 PC:

ssh -4 foo.crio.nl 22
The authenticity of host 'cloud02.crio.nl (178.22.63.146)' can't be established.
ED25519 key fingerprint is SHA256:zUsAMSk1ZWIWq9QbDHcCRJ1mNPPLs833HHHfx9T5CY8.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Thanks!

Andy

Is your host in same network of Win11 PC?
If not, the firewall of upstream ISP of your host may block outbound port 22.
Some server ISPs block it for measure of botnet.

Thanks. I’m wondering if it’s the host I’m trying to connect to that has the issue (maybe a firewall). But the weird part, is I can connect from my PC (home internet) . My server is with Linode, so a totally different network. I’ll wait and see what the host comes back with that I’m trying to connect to (it may be the blacklist all other servers, which seems a bit crazy!!)

So after all that, the host we were trying to connect to, admitted it was a fault in their firewall, and not us at all! All working now :slight_smile:

1 Like