Managing SSH Access

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, we will restrict SSH access to specific user accounts from specific sources. This will allow us to granularly control SSH access to a host.

*This course is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Allow Susan SSH access from host
  1. Edit the /etc/ssh/sshd_config file with the following line:

    sudo vi /etc/ssh/sshd_config
    • enter password for cloud_user
Permit root SSH login from the subnet
  1. The first step is to permit root logins by removing the comment in front of the line #PermitRootLogin yes in the /etc/ssh/sshd_conf file.
  2. Secondly, we need to add root@ to the AllowUsers line in the /etc/ssh/sshd_config file.
  3. Now we need to restart the sshd service so the changes we made will take affect:

    systemctl restart sshd  

Additional Resources

You've been tasked with locking down SSH access to a server to specific users and sources. You've been asked to make the following changes on a Red Hat server:

  1. Permit user Susan to SSH only from ""
  2. Permit root to log in from any IP in the network ""

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?