Changing SSH Port number on Raspberry Pi/Linux

Ssh (login remotely) into the RPi using Mac with the default port first. To do so, ppen a terminal and just type:

ssh pi@&lt;ip assigned to RPi&gt;

After entering your password:

sudo nano /etc/ssh/sshd_config

At about the 5th line of the file, change (of course you can change it to any port number you want to use. Check [www.iana.org][1] or [https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers][2] to find out which port number is available (or not):