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
Jak znaleźć najszybszy publiczny serwer DNS w Polsce?
Viewed 3925 times since Mon, May 21, 2018
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 8246 times since Sun, Jan 9, 2022
Linux LVM recovery
Viewed 19117 times since Wed, Jan 23, 2019
How to schedule crontab in Unix Operating Systems
Viewed 2796 times since Fri, Jun 8, 2018
Linux Audit The Linux security blog about Auditing, Hardening, and Compliance lynis
Viewed 3005 times since Thu, Jan 16, 2020
How To Use the Linux Auditing System on CentOS 7
Viewed 5164 times since Fri, Apr 5, 2019
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from
Viewed 6772 times since Wed, Oct 31, 2018
RHEL: Create a local RPM repository
Viewed 12529 times since Sun, May 27, 2018
Sample logrotate configuration and troubleshooting part 2
Viewed 10614 times since Fri, Nov 30, 2018
OpenSSL: Check If Private Key Matches SSL Certificate & CSR
Viewed 4122 times since Mon, Feb 18, 2019