What file keeps a list of known hosts for an SSH user?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The file that keeps a list of known hosts for an SSH user is indeed known_hosts. This file is part of the SSH configuration and is located in the user's home directory, specifically under the .ssh directory (i.e., ~/.ssh/known_hosts). Whenever a user first connects to a server using SSH, the server's public key is added to this file. The purpose of known_hosts is to help prevent man-in-the-middle attacks by allowing the SSH client to verify that it is connecting to the correct server in subsequent connections. If the server's key changes unexpectedly, the SSH client will alert the user, helping to protect against potential security issues.

The other options serve different purposes in the SSH configuration. The authorized_keys file contains the public keys of users who are authorized to access the SSH server. The config file stores user-specific configuration settings for SSH connections but does not list known hosts. The securetty file is associated with configurations for which terminals the root user can log in from on the server and is unrelated to SSH known hosts.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy