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: _blog/running-k8s-cluster-on-pi-a-step-by-step-guide/README.md
+78-1
Original file line number
Diff line number
Diff line change
@@ -188,8 +188,85 @@ IPADDR=192.168.137.51
188
188
IPADDR=192.168.137.52
189
189
```
190
190
191
-
### Security
191
+
### Security & Access
192
192
193
+
The steps in this section are optional but highly recommended.
194
+
195
+
#### Change the default Password.
196
+
197
+
I recommend to change the default `SSH` password from `raspberry` to something more unique and secure. To do so, first ssh into the first RPi device using the default password
Then enter the `passwd` command, your current password and type in the new password. Type it again for confirmation.
204
+
205
+
Repeat the above for the other RPi devices.
206
+
207
+
#### Change the `hostname`
208
+
209
+
Furthermore, for a more organised workflow, I change the `hostname` of each device so that when I `ssh` into them, I can see which Node I'm working with. As detailed in the above sections, I have a key name for each RPi device and I ultimately want to have the following:
Then edit the `hostname` using the preinstalled `nano` editor:
224
+
225
+
```
226
+
sudo nano /etc/hostname
227
+
```
228
+
229
+
Change `raspberrypi` to `learn8s-mn1`. Furthermore, we need to update the `hosts` file:
230
+
231
+
```
232
+
sudo nano /etc/hosts
233
+
```
234
+
235
+
Add change `raspberrypi` to `learn8s-mn1` at last line of the file. The last line should look like this:
236
+
237
+
```
238
+
127.0.1.1 learnk8s-mn1
239
+
```
240
+
241
+
Finally, `sudo reboot` the RPi device.
242
+
243
+
Repeat this foe the other RPi devices.
244
+
245
+
#### Passwordless SSH access
246
+
247
+
For more secure access to your RPi devices and also to avoid having to type in the `ssh` login password every time you want to `ssh` into a device, you can configure `ssh` to use your public `ssh key`. Assuming you have a public `ssh key` located in `~/.ssh` on your host machine, you can copy it into your RPi devices.
0 commit comments