SSH access via port 22 from outside Intranet fails
I have an identical problem as described in BigSur SSH can connect a server in the in… - Apple Community (that discussion is closed). Problem is still present in Ventura 13.2.1. In summary:
- I can connect to the SSH server from within my home Intranet without any problems
- I can connect to the same server from outside my Intranet if the server is listening on a port different from 22 (say, 4444). If I set up that router forwards port 22 to 4444 on the internal server, I can connect (ie. the router is not blocking 22). If I use any other port, it also works.
- if the server listens on port 22, then I cannot connect, whatever I do. I tried default, with enabling remote login (sshd is then started via launchd), I also tried disabling the remote log in and manually starting the server from the command line (to check if launchd was causing trouble) by executing sudo /usr/sbin/sshd -d -p 22 - still the same.
So, it doesn't appear that the problem is in the sshd server setup, nor forwarding setup on the router, nor anything in my client setup. I tried removing known_hosts file as well, no difference. I checked firewall settings etc, there's nothing there. Yet, something *IS* blocking port 22 *IF* the connection is coming from outside the Intranet.
I just don't know where else to look... any tips are greatly appreciated.