I'm trying to set up my iMac so I can ssh into it remotely (from outside my home network.) I also have a Linux server which, when using the same port forwarding in my router, I can do with zero problems.
From behind my router, I can ssh from my Linux box to my iMac with no trouble, both using internal IP (192.168.1.5) and the hostname (iKho), so the Remote Login (ssh) service is obviously working on my iMac.
If I go into my router and forward port 22 to my Linux machine, I can access it immediately after making the change - I ssh using my freedns hostname from my iPhone (strictly using my cell connection, not on wifi) and it just works.
As soon as I go back into the router, edit the SSH port forward to talk to my iMac (so I'm literally just changing the internal IP address), it refuses to work. Using the same iPhone connection, it errors out with "Unable to connect to server, please try again later."
Technically, I know I could leave it set to my Linux machine, and then ssh from there into my Mac. But for a demonstration I want to give in one of my classes, I need to be able to ssh directly into the Mac first.
I'm out of ideas - I don't see how it works locally both ways, but then only works to my Linux machine remotely. Is there some kind of limitation of MacOS's ssh server?
Thanks for any help,