SSH into another mac on different network using port other than 22 I tried to access one of my mac on a different network using a specified port: 1234
ssh remoteuser@remoteip -p 1234

but I got the result that connection refused. How do I specify the port I want to use other than the default 22?
Everything after the destination/address is passed to the target computer as a command. Try
ssh -p 1234 user@remote

instead.