From 3d42f255ff25df529caf6b76bf1b3f7234b01c72 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 28 Oct 2019 13:26:56 +0000 Subject: [PATCH] [201/lab sheet] Improve securing ssh bit --- 201/Lab-Sheet.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/201/Lab-Sheet.md b/201/Lab-Sheet.md index 71ba548..0dd59f3 100644 --- a/201/Lab-Sheet.md +++ b/201/Lab-Sheet.md @@ -151,7 +151,13 @@ Then, open PuTTY **TODO: Finish this** If someone manages to get in who isn't supposed to, they could do all kinds of damage! -The first, and easiest thing we can do it improve security is to prevent the `root` user logging in. We already have a non-root account that we use `sudo` with, so why allow direct access to `root` at all? Edit `/etc/ssh/sshd_config`, finding the line that says something like this: +The first, and easiest thing we can do it improve security is to prevent the `root` user logging in. We already have a non-root account that we use `sudo` with, so why allow direct access to `root` at all? Open `/etc/ssh/sshd_config` for editing like this: + +```bash +sudo nano /etc/ssh/sshd_config +``` + +This will open the `nano` command-line text editor. Others exist, but they are either not installed by default or more difficult to use. You can navigate with the arrow keys. Find the line that says something like this: ```config PermitRootLogin yes