12.03.2017 · Ssh (login remotely) into the RPi using Mac with the default port first. To do so, ppen a terminal and just type: ssh pi@<ip assigned to RPi> 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.
25.03.2020 · If you are looking for a procedure to change the SSH default port to another port number like 2222, check the SSH config file which is located on /etc/ssh/sshd_config. sudo nano /etc/ssh/sshd_config. So, you would see Port 22 that you can change it to Port 2222. Then, save the file and restart the SSH service:
14.10.2013 · If you change the port in the /etc/ssh/ssh_config file it allows you to connect to remote machines that use a non-standard port without using the -p parameter every time. I have several machines that have the port set to 666 in their /etc/ssh/sshd_config files
10.12.2016 · SSH Port number changed to 12148. After changing the port number hit CTRL+X and then Y to save the configuration file. After you do this restart your SSH service with the following command: sudo service ssh restart. 1. sudo service ssh restart. That’s it! You have now updated your Raspberry Pi’s SSH port number.