Change SSH port number using Terminal on an Apple Mac

Added by on in Web Design

When trying to connect to a server via SSH using Terminal on an Apple Mac, it will usually try to connect to port 22. An easy way to specify the port it connects to is by using the following line:

ssh -p portno user@hostname_or_ip

portno = The port number you’re trying to connect to
user = Your username
hostname_or_ip = Host name or IP address of the server you’re trying to connect to