In which file is the public key stored on the SSH server system?

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 public key is stored in the authorized_keys file on the SSH server system. This file is used to store the public keys of clients that are allowed to connect to the server via SSH. When a client attempts to authenticate, the server checks the public key presented by the client against the keys listed in the authorized_keys file. If there is a match, the server grants access without requiring a password, provided that the client has the corresponding private key.

The known_hosts file is used on the client side to track the public keys of SSH hosts that the client has connected to, aiding in preventing man-in-the-middle attacks. The id_rsa file typically contains the private key for SSH authentication, which should be kept secure and not shared. The sshd_config file is the configuration file for the SSH daemon, which controls various settings for the server, but it does not hold public keys.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy