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
Learn Linux System Auditing with Auditd Tool on CentOS/RHEL
Viewed 1759 times since Fri, Apr 5, 2019
Linux Screen
Viewed 1135 times since Sat, Jun 2, 2018
Cron YUM How to use yum-cron to automatically update RHEL/CentOS Linux
Viewed 1088 times since Fri, Oct 26, 2018
Linux ssh Hide OpenSSH Version Banner
Viewed 12920 times since Wed, Apr 22, 2020
RHEL: GPT/MBR partition tables (using disks larger than 2 TiB)
Viewed 10353 times since Sun, May 27, 2018
systemctl Use systemd to Start a Linux Service at Boot
Viewed 3994 times since Mon, Dec 7, 2020
Przekazywanie portów TCP rinetd
Viewed 40065 times since Thu, May 24, 2018
Odpalenie polecenia tylko na jedną godzinę
Viewed 1505 times since Thu, May 24, 2018
RHEL: Services basic management - systemd
Viewed 15987 times since Sat, Jun 2, 2018
ZPOOL: Detach a submirror from a mirrored zpool
Viewed 1335 times since Sun, Jun 3, 2018