SYS 255 ‐ Securing SSH - connor0329/repository-1 GitHub Wiki
Deliverables
1. Editing the "sshd" config file so you can't SSH into root and showing the "sshd" logs
EX:
- SSH into "dhcp01-connor"
- Type "sudo vi /etc/ssh/sshd_config
- Edit the file so that "Permit root login" says "no", like this:
- Type "sudo systemctl restart sshd"
- Exit SSH
- SSH into "dhcp01" as root, Type "ssh root@dhcp01-connor"
- Type "sudo journalctl -u sshd", should look like this
2. Figure out how to determine what the "root" "user id (uid)" is and show the "uid" in the "sshd" logs
EX:
- Type "cat etc/passwd | grep root"
- Keep in mind that the format of the above command is like this, "username:x:uid:gid:comment:home_directory;shell"
- This screenshot shows the root user "uid" is 0 attached to the denied logins: