Linux PAM configuration that allows or deny login via the sshd server

Linux PAM configuration that allows or deny login via the sshd server

last updated in Categories Howto, Linux, Linux login control, Networking, OpenBSD, RedHat/Fedora Linux, Security, Suse Linux, Sys admin, UNIX
Open SSH Logo

The idea is very simple you want to limit who can use sshd based on a list of users. The text file contains a list of users that may not log in (or allowed to log in) using the SSH server. This is used for improving security.

 

 

 

PAM (Pluggable authentication modules) allows you to define flexible mechanism for authenticating users. My previous post demonstrated how to deny or allow users using sshd configuration option. However, if you want to block or deny a large number of users, use PAM configuration.

A note for new sys admins

  1. Backup all data and PAM configuration files before any modification
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Exclude multiple files and directories with rsync
Viewed 3083 times since Wed, Oct 31, 2018
Linux Chage Command to Set Password Aging for User
Viewed 3090 times since Tue, Sep 11, 2018
Linux RAID Mdadm Cheat Sheet
Viewed 6151 times since Fri, May 15, 2020
Install Security Patches or Updates Automatically on CentOS and RHEL
Viewed 2367 times since Fri, Oct 26, 2018
Linux RedHat How To Create An RPM Package
Viewed 3902 times since Sun, Jan 9, 2022
logrotate Understanding logrotate utility
Viewed 2473 times since Sun, Jan 12, 2020
RHEL: Route network packets to go out via the same interface they came in
Viewed 3855 times since Sat, Jun 2, 2018
OEL 7 – How to disable IPv6 on Oracle Linux 7
Viewed 21447 times since Fri, Aug 3, 2018
Configuring VLAN interfaces in Linux
Viewed 6550 times since Mon, May 21, 2018
Netcat shell zabezpieczony hasłem
Viewed 2730 times since Thu, May 24, 2018