Securing your Raspberry: protect the SSH remote access by SSH port change
By default, the remote access to computers via SSH works via communication on port 22, and that's the port where any intrusion attempt will start from . To prevent that, you should change that port to another number. Almost any other port between 1 and 65535 will work, but some of the lower ones (under 1000) might get used by the system for other purposes. So, pick any number above 1000. Let's say we'll pick port number 27732.
First, let's change that port number in the Raspi. SSH into your Pi and modify the SSH settings file with 27732 in the line that reads "#Port22":
Hit ^X and Enter to commit the changes, reboot. The SSH connection will drop, and to restart the connection you will need to modify the session settings in MobaXTerm with that same port number 27732:
Hit OK. Your terminal window should come up again, now connected to the Raspi via that new port number 27732.
Done. Your Raspi is now slightly more hardened against the simple intrusion attempt via standard port 22.
First, let's change that port number in the Raspi. SSH into your Pi and modify the SSH settings file with 27732 in the line that reads "#Port22":
Hit ^X and Enter to commit the changes, reboot. The SSH connection will drop, and to restart the connection you will need to modify the session settings in MobaXTerm with that same port number 27732:
Hit OK. Your terminal window should come up again, now connected to the Raspi via that new port number 27732.
Done. Your Raspi is now slightly more hardened against the simple intrusion attempt via standard port 22.
Comments
Post a Comment