Change / add SSH port

Having fun and games with my router firmware which the hardware maker is fixing.

Whilst I wait, I want to add a second port into ssh config.
Under Linux I just add it into sshd_config, however this isn’t working in macOS.
I’ve changed sshd_config and also added the second port in etc/services.
Restarted ssh but it doesn’t listen on the second port.
Google doesn’t throw any recent results up.

Anyone got an idea what I’m missing? TIA :slight_smile:

Is your Mac the server or the client?

it’s the server, so on the mac updated sshd_config and services.
but the mac doesn’t allow connection on the second port

Having read around it more, this seems nigh on impossible without disabling SIP.

The joy of using a Mac! :stuck_out_tongue:

Just curious… why a second port? Can’t you just port forward the second port to 22?

Because my router is having issues with port translation

I guess my next question would be why do you need two ports for sshd? It’s easy enough to change the default port, even if having two separate ports isn’t easy.

I just wanted to add an extra port whilst the router couldn’t map it as I use 22 for other stuff internally.
I’ve since received a beta firmware that seems to have resolved the issue (well so far at least).

Thanks for your help and interest :slight_smile:

Gotcha. That makes sense. Sorry that we weren’t able to figure out a way, glad the beta firmware helped.

1 Like