From the course: Linux Hardening
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Limiting logins through SSH (demo) - Linux Tutorial
From the course: Linux Hardening
Limiting logins through SSH (demo)
In this demo, I'm going to show you how to limit login access through SSH. Now, just to show you that things are working, I'm going to actually log into my virtual machine with my user account. Now I'm going to type in the password. And you can see I successfully logged in. Now I'm going to go through the process of disabling or preventing myself from logging in. Now, since I already have a connection, that won't be closed, but we're going to go to the /etc/ssh directory. I'm just going to show you the contents. You see the sshd_config file. But here's the contents of that file. Now I'm searching for deny users, which is the command that I'm going to employ. Since it's not located in this folder, I'm going to actually exit the program. I'm going to go into the sshd_config.d directory, and I'm going to create my custom configuration file right in there. So you have to do this as root because you're in the /etc/ directory and only the root has the permission to write here. Now, I'd use…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
General handling of services, part one4m 22s
-
(Locked)
General handling of services, part two5m 30s
-
(Locked)
Hardening public-facing services4m 1s
-
(Locked)
Hardening the secure shell (SSH) service, part one5m 49s
-
(Locked)
Limiting logins through SSH (demo)3m 52s
-
(Locked)
Hardening the secure shell (SSH) service, part two2m 14s
-
-
-