Skip to Content
Mastering Linux Security and Hardening - Second Edition
book

Mastering Linux Security and Hardening - Second Edition

by Donald A. Tevault
February 2020
Intermediate to advanced
666 pages
15h 45m
English
Packt Publishing
Content preview from Mastering Linux Security and Hardening - Second Edition

Hands-on lab – configuring whitelists within sshd_config

This lab will work on any of your VMs. Follow these steps:

  1. On the VM that you wish to configure, create user accounts for Frank, Charlie, and Maggie. On Ubuntu, do the following:
sudo adduser frank. . .

On CentOS, do the following:

sudo useradd franksudo passwd frank. . .
  1. Create the webadmins group and add Frank to it:
sudo groupadd webadminssudo usermod -a -G webadmins frank
  1. From either your host machine or from another VM, have the three users log in. Then, log them back out.
  1. Open the /etc/ssh/sshd_config file in your favorite text editor. At the bottom of the file, add an AllowUsers line with your own username, like so:
AllowUsers donnie
  1. Then, restart the SSH service and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Security and Hardening - Third Edition

Mastering Linux Security and Hardening - Third Edition

Donald A. Tevault
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 9781838981778Supplemental Content