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
SSH ProxyCommand example: Going through one host to reach another server
Viewed 3214 times since Tue, Aug 6, 2019
How to accurately determine when the system was booted
Viewed 692 times since Wed, Oct 3, 2018
LUKS dm-crypt/Device encryption GUIDE
Viewed 790 times since Fri, Jul 13, 2018
3 Ways to Check Linux Kernel Version in Command Line
Viewed 1134 times since Fri, Apr 19, 2019
Enabling or disabling a repository using Red Hat Subscription Management
Viewed 1241 times since Mon, Oct 29, 2018
RHEL: Getting/Setting hardware clock’s time
Viewed 1222 times since Sat, Jun 2, 2018
RHEL: Display swap/RAM size
Viewed 1178 times since Sat, Jun 2, 2018
logrotate Log Rotate Configuration
Viewed 917 times since Sun, Jan 12, 2020
RHCS6: Debug and test multicast traffic between two hosts
Viewed 968 times since Sun, Jun 3, 2018
Modifying the inode count for an ext2/ext3/ext4 file system
Viewed 398 times since Fri, Sep 18, 2020