MacOS – Enable SSH server on different network interface

macosNetworkssh

I enabled "System Preferences" -> "Sharing" -> "Remote Login". The dialog is telling me

To log in to this computer remotely, type “ssh user@10.11.12.13”.

And this works fine on the 10.x network. However, I have two network adapters in the system, and I want to connect via SSH on the other network. How do I make the SSH Server open port 22 on all network interfaces?

Best Answer

I think this message should be reworked since the sshd daemon listens on all network interfaces and this just tries to show the same IP address as the default IPv4 route to the internet as one address that could be used.

You should be able to ssh in on all IPv6 and IPv4 addresses on the Mac irregardless of what this message says.

Unless you've modified your sshd configuration or network firewall, this should work out of the box. If you port scan one of the addresses to find it's not listening - then check firewall before you check the ssh configuration.

Also, the system logs can show you that ssh is listening and processing connection attempts, but this probably is just an imprecise message causing you to worry needlessly.