From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Exclusive SSH groups - Linux Tutorial
From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Exclusive SSH groups
- In this portion of the lab, we're going to restrict access to the SSH server by creating an exclusive group. Don't just allow anyone to connect. By creating an exclusive group, we can specify and organize the users and groups of users that are allowed to connect. So we'll go back to our server here. And the first thing I want to do is create a new group. So I'm going to use the addgroup command, and we'll call this ssh-allowed. That'll be the group name, with the new group ID. And now I'm going to add the user account to that group. So we'll do an adduser command, and the user and the group name. Good. So the user named user has been added to the group, ssh-allowed, and that is done. Let's verify the existence of user within that ssh-allowed group. And we'll do groups user. And we see, indeed, user is now a member of ssh-allowed. That's on the end there. You can also do an ID command for a user, and you should see ssh-allowed on the end there as well, with the ID number for that…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Learning objectives1m 18s
-
(Locked)
Review of SSH1m 47s
-
(Locked)
Using keys to connect via SSH12m 57s
-
(Locked)
The sshd_config file3m 19s
-
(Locked)
Modifying the default SSH port7m 32s
-
(Locked)
Disabling password-based SSH2m 57s
-
(Locked)
Disabling root login via SSH2m 32s
-
(Locked)
Exclusive SSH groups4m 37s
-
(Locked)
Authentication settings10m 6s
-
(Locked)
Terminating SSH connections, part 17m 45s
-
(Locked)
Terminating SSH connections, part 26m 51s
-
(Locked)
-
-
-
-
-