Security on the Raspberry Pi is often overlooked especially with the rise of IoT (Internet of Things) gadgets and every device being connected to the internet. Today I will show you some easy tips and tricks you can take to improve the security of your Raspberry Pi. I recently wrote an article about 3 steps to take to improve your SSH security on the Raspberry Pi. Today’s focus will be more of the basics and general security tips and tricks that you should be doing on every Pi setup. The following steps should be done by new and experienced Raspberry Pi users and will improve the security of your system ten-fold.
I will discuss how to delete the default Raspberry Pi ‘pi’ user as well as changing the password for any other users you create. This is a good first step because if a hacker identify’s that your system is running the Rasbian distro then one can assume that there is a user called ‘pi’ on the system and can begin trying to crack that users password. Deleting the default ‘pi’ user and creating a new Raspberry Pi username and password will make it much harder to gain access to your system.
I will also be discussing about installing Fail2Ban which will block hackers from brute-forcing your username and password. This is good because it will block the hackers IP Address if they fail to login to your system and they will be unable to perform an unlimited number of username and passwords trying to gain access to your system. Another item that I will be discussing is setting up unique SSH keys, this will allow only clients that have the correct keys that you generated to login to your Raspberry Pi. This is one of the most secure ways of logging into your Raspberry Pi because only computers that you give the generated key file will be able to login and anyone who doesn’t have the key file will be blocked.
The final security tip and trick I will show you will be how to setup automated security updates. This is great if you are using your Raspberry Pi as a server and don’t access it often. All Raspbian security updates will be downloaded and applied in the background so you know you are running the latest and most secure software.
To learn about and perform basic security steps on our Raspberry Pi to improve our overall security on the Raspberry Pi system
You will need the following:
- Raspberry Pi
- 8GB Micro SD Card
- 2.5A Power Supply
- Raspbian OS (I will assume you are running Raspbian although this tutorial will apply to any Debian based Linux distro)