A new key pair has been created to facilitate secure logins without the use of passwords to a server. Which action should be taken next to correctly and securely deploy the key for authentication?
Use a dedicated utility to upload the user's public key to the server's list of authorized keys.
Manually insert the public key data within a configuration file on the server.
Transfer the private key to the server to allow direct recognition during login attempts.
Reboot the server to automatically detect and authorize the new key pair for use.
To deploy the key and enable secure logins without passwords, the public key must be added to the ~/.ssh/authorized_keys file on the server. The ssh-copy-id command automates this process, ensuring the correct permissions are set and reducing the risk of manual errors. It only requires the username and hostname of the server, making the process efficient and secure. The other options are incorrect because they either expose the private key, are unnecessary (restarting the SSH service), or do not follow best practices for securely copying the public key to the server.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a key pair in the context of secure server authentication?
Open an interactive chat with Bash
What is the purpose of the `~/.ssh/authorized_keys` file?
Open an interactive chat with Bash
Why should I use the `ssh-copy-id` command instead of manually editing the authorized_keys file?