From 257b06c581b9c94c68f70d75c836379d1e69e7c6 Mon Sep 17 00:00:00 2001 From: Tai Date: Mon, 4 Jan 2021 15:34:02 -0800 Subject: [PATCH] Update README.md --- initial ubuntu setup/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/initial ubuntu setup/README.md b/initial ubuntu setup/README.md index 07a5f38..6574f8d 100644 --- a/initial ubuntu setup/README.md +++ b/initial ubuntu setup/README.md @@ -58,8 +58,11 @@ If you'd like to learn how to create an SSH key do so [here](https://github.com/ ``` sudo sed --in-place 's/^PermitRootLogin.*/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config sudo sed --in-place 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config +systemctl restart sshd ``` -Using two sed commands above is the short way to disable root login. To disable it manually you can just do `sudo nano /etc/ssh/sshd_config` find a line called PermitRootLogin modify it. Then find a line called PasswordAuthentication and modify it as well. +Using two sed commands above is the short way to disable root login. +To disable it manually you can just do `sudo nano /etc/ssh/sshd_config` find a line called PermitRootLogin modify it. +Then find a line called PasswordAuthentication and modify it as well. If you need to be a root user, first login as **sammy**, your username. Then use the command below to be a root user. ```