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
Linux Network (TCP) Performance Tuning with Sysctl
Viewed 8362 times since Fri, Aug 3, 2018
Top 20 OpenSSH Server Best Security Practices - good article
Viewed 8149 times since Mon, Oct 1, 2018
How to enable automatic security updates on CentOS 7 with yum-cron
Viewed 1395 times since Fri, Oct 26, 2018
ZPOOL: Grow a zpool by adding new device(s)
Viewed 4302 times since Sun, Jun 3, 2018
LVM: Reduce an existing Logical Volume / Filesystem
Viewed 1440 times since Sat, Jun 2, 2018
debian Install a newer kernel in Debian 9 (stretch) stable
Viewed 903 times since Sun, Sep 23, 2018
Linux / UNIX: Run Command a Number of Times In a Row
Viewed 13647 times since Tue, Aug 6, 2019
How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers
Viewed 9432 times since Thu, Jul 19, 2018
Deskshare TLS over Stunnel
Viewed 1610 times since Fri, Sep 28, 2018
How to create stunnel with systemd? stunnel
Viewed 3632 times since Thu, Jan 16, 2020