{"id":5804,"date":"2023-10-20T16:01:27","date_gmt":"2023-10-20T16:01:27","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=5804"},"modified":"2023-10-21T12:01:40","modified_gmt":"2023-10-21T12:01:40","slug":"6-ways-to-keep-your-raspberry-pi-5-safe","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/","title":{"rendered":"6 Ways to Keep Your Raspberry Pi 5 Safe"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image-1024x576.png\" alt=\"Raspberry Pi 5 Security Title Image\" class=\"wp-image-5805\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image-1024x576.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image-768x432.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>What should you do to secure your Raspberry Pi 5? In this article, I&#8217;ll go over some of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.<\/p>\n\n\n\n<p>So before (or while) you&#8217;re setting up your Raspberry Pi 5, read this article first!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#1: Set up secure passwords, <em>seriously<\/em><\/h2>\n\n\n\n<p>For many people, the standard way of setting up Raspberry Pi 5 will begin with this: <a href=\"https:\/\/www.raspberrypi.com\/software\/\">the Raspberry Pi Imager<\/a>.<\/p>\n\n\n\n<p>Luckily, in the past few years, the Raspberry Pi Imager has really evolved. Today, it&#8217;s super easy to get started and quickly set up security protocols on your Pi.<\/p>\n\n\n\n<p>So, first things first, if you don&#8217;t need a communication interface, don&#8217;t set it up. If you&#8217;re planning on setting up your Raspberry Pi 5 for something without WiFi, then don&#8217;t set up WiFi. If you won&#8217;t SSH into your Pi, then don&#8217;t configure it.<\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"562\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-1024x562.png\" alt=\"Raspberry Pi Imager\" class=\"wp-image-5808\" style=\"aspect-ratio:1.8220640569395017;width:672px;height:auto\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-1024x562.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-300x165.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-768x422.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-1536x844.png 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Screenshot-from-2023-10-20-15-16-57.png 1912w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Of course, you can change your mind later and enable these interfaces after you have your Pi set up already. But if you&#8217;re going to use these interfaces, then you need to use strong passwords.<\/p>\n\n\n\n<p>Strong passwords are long, include lowercase and uppercase letters, numbers, and special characters. But really, the best passwords are more like <em>passphrases.<\/em><\/p>\n\n\n\n<p>Don&#8217;t take my word for it. Listen to Edward Snowden:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" hcb-fetch-image-from=\"https:\/\/www.youtube.com\/watch?v=yzGzB-yYKcc\" title=\"Edward Snowden on Passwords: Last Week Tonight with John Oliver (HBO)\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/yzGzB-yYKcc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Today, the Raspberry Pi Imager does not offer a default username and password. Historically, however, <a href=\"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-default-password\/\">as we&#8217;ve written about before<\/a>, the default username and passwords on Raspberry Pis were:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>username: <\/strong>pi<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>password: <\/strong>raspberry<\/p>\n\n\n\n<p>Therefore, a lot of Raspberry Pis out there in the world still have this username and password. This is an easy combination to remember, but not a very secure one.<\/p>\n\n\n\n<p>Please be smart about passwords, because they&#8217;re often your primarily line of defense. Of course, even better than passwords are SSH keys, but I&#8217;ll leave that for another time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#2: Update &amp;&amp; Upgrade<\/h2>\n\n\n\n<p>So once you&#8217;ve got your new Raspberry Pi OS flashed onto the SD card, you need to make sure that everything is up to standard.<\/p>\n\n\n\n<p>What you need to do here is simply classic Debian style.<\/p>\n\n\n\n<p>Open up the terminal and run:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo apt update &amp;&amp; sudo apt upgrade\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">update<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&amp;&amp;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">upgrade<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>If you&#8217;re already a Debian user, you&#8217;re probably used to running this constantly. You&#8217;ve got do it before you install a new program, before you make any changes, or just every few days.<\/p>\n\n\n\n<p>If you&#8217;re not a Debian user, it might seem unnecessary, but you should absolutely integrate this into your daily computer tasks. If you&#8217;re Pi&#8217;s software is up-to-date, it is more secure.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#3: Determine who can access SSH<\/h2>\n\n\n\n<p>As I mentioned above, if you&#8217;re not going to SSH into your Pi, then you can simply disable SSH as an interface. However, if you are planning on using SSH, then you should make sure that it&#8217;s as secure as possible.<\/p>\n\n\n\n<p>There are actually a few different ways to ensuring that your SSH is secure, so let me go over a few of them.<\/p>\n\n\n\n<p>One of them is to limit the users who can access the Pi via SSH.<\/p>\n\n\n\n<p>You do this by changed your SSH Daemon configuration file. So you go to the terminal and type in:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo nano \/etc\/ssh\/sshd_config\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">nano<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">etc<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">ssh<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">sshd_config<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Then scroll to the bottom and add <code>AllowUsers<\/code> followed by the usernames you want to allow. Hit Ctrl-X and then run:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo service ssh restart\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">service<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ssh<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">restart<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>And now you&#8217;ve limited access to your Raspberry Pi&#8217;s SSH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#4: Change the SSH port number<\/h2>\n\n\n\n<p>Another way to keep your SSH secure is to change the SSH port number.<\/p>\n\n\n\n<p>The default SSH port number is 22.<\/p>\n\n\n\n<p>Guess who knows that? Everyone who&#8217;s looking for open SSH ports. <\/p>\n\n\n\n<p>So the classic sysadmin fix it to change that number. On your Raspberry Pi, all you need to do is go to the terminal and again change the SSH Daemon configuration file.<\/p>\n\n\n\n<p>So run:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo nano \/etc\/ssh\/sshd_config\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">nano<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">etc<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">ssh<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">sshd_config<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>And what you&#8217;ll need to do is to scroll down and then change the line that reads #<code>Port 22 <\/code>to something like <code>Port 2222<\/code>. You&#8217;ll also want to delete the # at the beginning of the line.<\/p>\n\n\n\n<p>I should mention that you can also make it another number if you&#8217;d like. 2222 is just the typical change.<\/p>\n\n\n\n<p>But then, once again, you need to restart SSH (don&#8217;t forget this step!):<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo service ssh restart\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">service<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ssh<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">restart<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Now, when you want to SSH into your Raspberry Pi, you&#8217;ll need to add <code>-p 2222<\/code> to the SSH command in the terminal.<\/p>\n\n\n\n<p>But that&#8217;s it for SSH stuff. Now onto other basic protections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#5: Install Fail2Ban<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/fail2ban\/fail2ban\">Fail2Ban<\/a> is a wonderful piece of software that blocks IP addresses after they try to log in too many times. It automatically updates the Raspberry Pi&#8217;s firewall to block potentially malicious IP addresses.<\/p>\n\n\n\n<p>Thus, it is very useful for keeping your Raspberry Pi secure. It&#8217;s also very lightweight at only about 3,000 kB.<\/p>\n\n\n\n<p>So after you&#8217;ve used strong passwords, configured your SSH interface, and updated your Raspberry Pi, I recommend installing Fail2Ban.<\/p>\n\n\n\n<p>You should update again:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo apt update &amp;&amp; sudo apt upgrade\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">update<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">&amp;&amp;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">upgrade<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>And then run:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo apt install fail2ban\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fail2ban<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Fail2Ban can do a lot of things and I won&#8217;t go into the details here. If you&#8217;re interested, then you can dig into the configuration files by going to <code>\/etc\/fail2ban<\/code>.<\/p>\n\n\n\n<p>The default configuration is set to 5 failed attempts before it bans the IP address and then the IP address is banned for 10 minutes.<\/p>\n\n\n\n<p>It&#8217;s a great little program to protect against someone trying to brute force your password. So now that you&#8217;ve gotten that set up, there&#8217;s one more thing to do with your Raspberry Pi 5.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#6: Back up your data, <em>seriously<\/em><\/h2>\n\n\n\n<p>This step is just as important as using good passwords and, unfortunately, just as often ignored.<\/p>\n\n\n\n<p>Your SD card can fail and I&#8217;m not alone in that experience.<\/p>\n\n\n\n<p>One of my friends was keeping a lot of important stuff on her SD card and then it failed her miserably. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"416\" height=\"369\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/image-69.png\" alt=\"Cool Flash Drives\" class=\"wp-image-5811\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/image-69.png 416w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/image-69-300x266.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/image-69-14x12.png 14w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/figure>\n<\/div>\n\n\n<p>Don&#8217;t be like Anna. Back up your data!<\/p>\n\n\n\n<p>By the way, if you&#8217;re interested in learning more about SD cards, which ones you should get, and why they fail, then check out these articles:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-5-micro-sd-card-speed\/\">Raspberry Pi 5 Micro SD Card Speed<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/picockpit.com\/raspberry-pi\/sd-card-classes\/\">Classifying SD Cards<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/picockpit.com\/raspberry-pi\/part-2-how-does-flash-memory-work\/\">How does Flash Memory work?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/picockpit.com\/raspberry-pi\/part-3-what-are-card-grades-and-why-are-they-important\/\">What are SD Card grades?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/picockpit.com\/raspberry-pi\/monitor-sd-card-health-of-raspberry-pi\/\">All about SD Card Health on the Raspberry Pi<\/a><\/li>\n<\/ul>\n\n\n\n<p>Get a cool-looking USB stick, use Google Drive, use Dropbox. Ok, don&#8217;t use those last two if you actually care about security, but you get what I mean!<\/p>\n\n\n\n<p>You need to keep your data safe and secure and backed up. Trust me.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>So there you have it, folks. Those are the 6 things you should do immediately with your Raspberry Pi 5 in order to keep it secure.<\/p>\n\n\n\n<p>Of course, this advice really only covers the basics. But once you have done these, you&#8217;ve at least ensured a minimal wall of security for your Pi 5.<\/p>\n\n\n\n<p>Do you have any other ways of keeping your Pi safe? Let us know in the comments!<\/p>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2F6-ways-to-keep-your-raspberry-pi-5-safe%2F&text=6%20Ways%20to%20Keep%20Your%20Raspberry%20Pi%205%20Safe\" title=\"Share on X\" aria-label=\"Share on X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">share<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2F6-ways-to-keep-your-raspberry-pi-5-safe%2F\" title=\"Share on Facebook\" aria-label=\"Share on Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">share<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2F6-ways-to-keep-your-raspberry-pi-5-safe%2F&text=6%20Ways%20to%20Keep%20Your%20Raspberry%20Pi%205%20Safe\" title=\"Share on Telegram\" aria-label=\"Share on Telegram\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">share<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2F6-ways-to-keep-your-raspberry-pi-5-safe%2F\" title=\"Share on Reddit\" aria-label=\"Share on Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">share<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>What should you do to secure your Raspberry Pi 5? In this article, I&#8217;ll go over some of the quickest and best ways to ensure that your Raspberry Pi 5 is safe. So before (or while) you&#8217;re setting up your Raspberry Pi 5, read this article first! #1: Set up secure passwords, seriously For many&hellip;<\/p>\n","protected":false},"author":2,"featured_media":5805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1962],"tags":[2084,2083,1869,2081,606,422,2078,189,187,783,1718,166,2028,699,680,2082,2077,2076,2079,2080],"class_list":["post-5804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-5","tag-backup","tag-fail2ban","tag-hacking","tag-key","tag-linux","tag-password","tag-passwords","tag-pi","tag-raspberry-pi","tag-raspberry-pi-os","tag-safety","tag-sd-card","tag-sd-cards","tag-security","tag-ssh","tag-ssh-port-number","tag-tips","tag-tricks","tag-update","tag-upgrade"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit<\/title>\n<meta name=\"description\" content=\"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T16:01:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-21T12:01:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"raspi berry\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"raspi berry\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/\"},\"author\":{\"name\":\"raspi berry\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\"},\"headline\":\"6 Ways to Keep Your Raspberry Pi 5 Safe\",\"datePublished\":\"2023-10-20T16:01:27+00:00\",\"dateModified\":\"2023-10-21T12:01:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/\"},\"wordCount\":1164,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Raspberry-Pi-5-Security-Title-Image.png\",\"keywords\":[\"Backup\",\"Fail2Ban\",\"Hacking\",\"key\",\"linux\",\"password\",\"Passwords\",\"Pi\",\"Raspberry Pi\",\"Raspberry Pi OS\",\"Safety\",\"SD Card\",\"SD cards\",\"security\",\"ssh\",\"SSH port number\",\"Tips\",\"Tricks\",\"Update\",\"Upgrade\"],\"articleSection\":[\"Raspberry Pi 5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/\",\"name\":\"6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Raspberry-Pi-5-Security-Title-Image.png\",\"datePublished\":\"2023-10-20T16:01:27+00:00\",\"dateModified\":\"2023-10-21T12:01:40+00:00\",\"description\":\"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Raspberry-Pi-5-Security-Title-Image.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Raspberry-Pi-5-Security-Title-Image.png\",\"width\":1200,\"height\":675,\"caption\":\"Raspberry Pi 5 Security Title Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/6-ways-to-keep-your-raspberry-pi-5-safe\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi 5\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/raspberry-pi-5\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"6 Ways to Keep Your Raspberry Pi 5 Safe\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\",\"name\":\"raspi berry\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"caption\":\"raspi berry\"},\"description\":\"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)\",\"sameAs\":[\"https:\\\/\\\/picockpit.com\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/author\\\/raspi-berry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit","description":"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/","og_locale":"en_US","og_type":"article","og_title":"6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit","og_description":"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.","og_url":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2023-10-20T16:01:27+00:00","article_modified_time":"2023-10-21T12:01:40+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png","type":"image\/png"}],"author":"raspi berry","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"Written by":"raspi berry","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/"},"author":{"name":"raspi berry","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee"},"headline":"6 Ways to Keep Your Raspberry Pi 5 Safe","datePublished":"2023-10-20T16:01:27+00:00","dateModified":"2023-10-21T12:01:40+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/"},"wordCount":1164,"commentCount":1,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png","keywords":["Backup","Fail2Ban","Hacking","key","linux","password","Passwords","Pi","Raspberry Pi","Raspberry Pi OS","Safety","SD Card","SD cards","security","ssh","SSH port number","Tips","Tricks","Update","Upgrade"],"articleSection":["Raspberry Pi 5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/","url":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/","name":"6 Ways to Keep Your Raspberry Pi 5 Safe | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png","datePublished":"2023-10-20T16:01:27+00:00","dateModified":"2023-10-21T12:01:40+00:00","description":"In this article, I summarize five of the quickest and best ways to ensure that your Raspberry Pi 5 is safe.","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/10\/Raspberry-Pi-5-Security-Title-Image.png","width":1200,"height":675,"caption":"Raspberry Pi 5 Security Title Image"},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/6-ways-to-keep-your-raspberry-pi-5-safe\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"Raspberry Pi 5","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/raspberry-pi-5\/"},{"@type":"ListItem","position":3,"name":"6 Ways to Keep Your Raspberry Pi 5 Safe"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"PiCockpit","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee","name":"raspi berry","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","caption":"raspi berry"},"description":"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)","sameAs":["https:\/\/picockpit.com"],"url":"https:\/\/picockpit.com\/raspberry-pi\/author\/raspi-berry\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/posts\/5804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/comments?post=5804"}],"version-history":[{"count":8,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/posts\/5804\/revisions"}],"predecessor-version":[{"id":5816,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/posts\/5804\/revisions\/5816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/media\/5805"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/media?parent=5804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/categories?post=5804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/wp-json\/wp\/v2\/tags?post=5804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}