Session length

1 / 20

To disable root login via SSH, which file must be edited?

/etc/ssh/sshd_config

The correct choice, which is to edit the /etc/ssh/sshd_config file, is significant because this file contains the configuration settings for the SSH daemon (sshd). One of the directives you can set in this configuration file is "PermitRootLogin". By changing this directive to "no", you can effectively disable direct root login over SSH, enhancing the security of the server.

Disabling root login via SSH is a recommended security practice, as it reduces the attack surface by preventing external access to the root account. Instead, users can log in with their own accounts and then use commands like 'sudo' to perform administrative tasks, which also provides an audit trail of user actions.

The other choices pertain to different functions within a Linux system. /etc/hosts is used for hostname resolution, /etc/network/interfaces is relevant for network configuration settings, and /home/user/.bashrc is a script that is executed whenever a new terminal session is started for a specific user, primarily used for user environment settings. None of these files control settings related to SSH access and therefore would not help in disabling root login.

/etc/hosts

/etc/network/interfaces

/home/user/.bashrc

Next question

Find the option that is right for you!

All options are one-time payments.

$12.50

30 day premium pass

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$30.00 $87.50 usd

6 month DELUXE pass (most popular)

Everything with the 30 day premium pass FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • Everything included in the premium pass
  • $87.50 usd value for $30.00! You save $57.50!
  • + Access to the ultimate digital PDF study guide
  • + 6 months of premium pass access
  • + Priority support
$12.50 $18.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy