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
RHEL: Reinstalling Boot Loader on the Master Boot Record (MBR)
Viewed 1438 times since Sun, May 27, 2018
OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu
Viewed 1248 times since Thu, May 24, 2018
RHEL: Retrieve and generate a unique SCSI identifier
Viewed 1222 times since Sat, Jun 2, 2018
ZPOOL: Remove an existing zpool
Viewed 858 times since Sun, Jun 3, 2018
How to encrypt a partition using LUKS?
Viewed 787 times since Fri, Jul 13, 2018
How to Register and Enable Red Hat Subscription, Repositories and Updates for RHEL 7.0 Server
Viewed 1653 times since Mon, Oct 29, 2018
How To Use Systemctl to Manage Systemd Services and Units
Viewed 255 times since Mon, Dec 7, 2020
ZFS: Snapshots and clones on zfs filesystems
Viewed 1339 times since Sun, Jun 3, 2018
10 nmap Commands Every Sysadmin Should Know
Viewed 1116 times since Wed, May 22, 2019
RHEL: Getting/Setting hardware clock’s time
Viewed 1310 times since Sat, Jun 2, 2018