You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/raspberry-pi.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,16 @@ date: "2024-11-01T19:10:09Z"
3
3
title: "Raspberry Pi Setup"
4
4
summary: |
5
5
My journey on my Raspberry Pi setup. Learn how to
6
-
setup it up yourself!
6
+
set it up yourself!
7
7
---
8
8
9
9
## Intro
10
10
11
-
A few days ago I finnally pulled the trigger and bought a Raspberry Pi. For those who don't know what it is,
11
+
A few days ago I finally pulled the trigger and bought a Raspberry Pi. For those who don't know what it is,
12
12
Raspberry Pi is a single board computer, where you can run/host multiple services, like VPN, home automation and even Game servers.
13
-
I've been spending too much time reading and lerking on subreddits like [r/homeserver](https://www.reddit.com/r/HomeServer/) or [r/selfhosted](https://www.reddit.com/r/selfhosted), so
13
+
I've been spending too much time reading and lurking on subreddits like [r/homeserver](https://www.reddit.com/r/HomeServer/) or [r/selfhosted](https://www.reddit.com/r/selfhosted), so
14
14
it was about time. I decided to go with the most recent Raspberry Pi 5 8GB version, so I'm not very limited in terms of
15
-
the amount of services that I'm able to run concurrently. Additionnaly to the Raspberry Pi you have to buy multiple things:
15
+
the amount of services that I'm able to run concurrently. Additionally to the Raspberry Pi, you have to buy multiple things:
16
16
17
17
- Power supply
18
18
- Micro-SD and a Micro-SD reader
@@ -21,19 +21,19 @@ the amount of services that I'm able to run concurrently. Additionnaly to the Ra
21
21
22
22
## Raspberry Pi Setup
23
23
24
-
The setup was quite straight forward despite being my first time delving into small eletronics. The official Raspberry Pi box came with
25
-
rubber feets, a small heat sink which I applied to the CPU and a fan, which I plugged into the fan controller in the Raspberry board.
26
-
After, I installed the recommend Raspberry Pi Operating System 64bit version on the Micro-SD, remembering to enable SSH, and inserted on the back side of the board.
24
+
The setup was quite straightforward despite being my first time delving into small electronics. The official Raspberry Pi box came with
25
+
rubber feet, a small heat sink which I applied to the CPU, and a fan, which I plugged into the fan controller in the Raspberry board.
26
+
After, I installed the recommended Raspberry Pi Operating System 64bit version on the Micro-SD, remembering to enable SSH, and inserted it on the back side of the board.
27
27
28
-
So you probably caught on that with SSH enable I don't really need the micro HDMI, and you are right, but as I quickly understood later,
28
+
So you probably caught on that with SSH enabled I don't really need the micro HDMI, and you are right, but as I quickly understood later,
29
29
it is never a bad practice to have another way to debug what is happening on your system.
30
30
31
31
The final steps were the following:
32
-
Discover which IP your Raspberry Pi got. There are multiple ways:
32
+
Discover which IP your Raspberry Pi has. There are multiple ways:
33
33
Use your router page: Login to your router and see which local IP is assigned.
34
34
Use a tool like `nmap` to scan your local network and see the devices in your network.
35
35
36
-
Having the IP you can login with the following command:
36
+
Having the IP you can log in with the following command:
37
37
38
38
```bash
39
39
ssh <user>@<ip>
@@ -51,15 +51,15 @@ The `-y` or `--assume-yes` flag, as the name implies, answers yes to all the que
51
51
52
52
Disable SSH password authentication:
53
53
54
-
To setup a more secure login mechanism I disabled password authentication in favor of the more secure **public key authentication**.
55
-
First step was to create a public/private key par on your host computer. You can do that in Linux with the following command:
54
+
To set up a more secure login mechanism I disabled password authentication in favor of the more secure **public key authentication**.
55
+
The first step was to create a public/private key pair on your host computer. You can do that in Linux with the following command:
56
56
57
57
```bash
58
58
ssh-keygen
59
59
```
60
60
61
61
Having the keys created, you copy the public key you just created to a file `authorized_keys` in your `~/.ssh/` directory. The `~` is
62
-
equivelent to a directory `/home/<your-user>`. After you can test if you can login to your raspberry pi with the command:
62
+
equivalent to a directory `/home/<your-user>`. After you can test if you can log in to your Raspberry Pi with the command:
63
63
64
64
```bash
65
65
ssh <your-user>@<ip> -i <path-to-your-key.pub>
@@ -74,15 +74,15 @@ Host my-pi
74
74
IdentifyFile <path-to-your-key>
75
75
```
76
76
77
-
Now to login you use:
77
+
Now to log in you use:
78
78
79
79
```bash
80
80
ssh my-pi
81
81
```
82
82
83
-
Finnally, now that you tested you can login through public key authentication you can disable password authentication. To do that you
84
-
have to edit the file `/etc/ssh/sshd_config` in your raspberry file. Select the editor you are most familiar with, for me its`vim`, but for most beginners
85
-
it would be `nano`. In the raspberry OS, the version of `vim` available its the vim-tiny under the `vi` command.
83
+
Finally, now that you tested you can log in through public key authentication you can disable password authentication. To do that you
84
+
have to edit the file `/etc/ssh/sshd_config` in your Raspberry file. Select the editor you are most familiar with, for me it's`vim`, but for most beginners,
85
+
it would be `nano`. In the Raspberry OS, the version of `vim` available is the vim-tiny under the `vi` command.
86
86
87
87
```bash
88
88
vi /etc/ssh/sshd_config
@@ -94,14 +94,14 @@ Now edit the line `#PasswordAuthentication yes` so it looks like this:
94
94
PasswordAuthentication no
95
95
```
96
96
97
-
Notice the lack of `#`in the beginning of the line, which uncomments the line.
97
+
Notice the lack of `#`at the beginning of the line, which uncomments the line.
98
98
99
-
Now you have to restart the ssh service with
99
+
Now you have to restart the SSH service with
100
100
101
101
```bash
102
102
sudo systemctl restart sshd
103
103
```
104
104
105
-
Check if its trully disable by trying to login again with your password.
105
+
Check if it's truly disabled by trying to log in again with your password.
106
106
107
-
I hope this guide was insightfull, next I will go through how I hosted my first service `Pi hole`.
107
+
I hope this guide was insightful, next, I will go through how I hosted my first service `Pi hole`.
0 commit comments