Which of the following commands can be used to verify the authenticity of an SSH public key, ensuring that it belongs to the expected user?Select one:a.ssh-keygen -lf ~/.ssh/authorized_keysb.ssh-keyscan user@remote_hostc.ssh-keygen -lf ~/.ssh/id_rsa.pubd.ssh-keygen -lf ~/.ssh/known_hosts
Question
Which of the following commands can be used to verify the authenticity of an SSH public key, ensuring that it belongs to the expected user?Select one:a.ssh-keygen -lf ~/.ssh/authorized_keysb.ssh-keyscan user@remote_hostc.ssh-keygen -lf ~/.ssh/id_rsa.pubd.ssh-keygen -lf ~/.ssh/known_hosts
Solution
The correct command to verify the authenticity of an SSH public key, ensuring that it belongs to the expected user is:
c. ssh-keygen -lf ~/.ssh/id_rsa.pub
Here's why:
a. ssh-keygen -lf ~/.ssh/authorized_keys: This command would list the fingerprint of all keys in the authorized_keys file, not verify a specific public key.
b. ssh-keyscan user@remote_host: This command fetches the public key of the remote_host, it doesn't verify a specific public key.
c. ssh-keygen -lf ~/.ssh/id_rsa.pub: This command will display the fingerprint of the public key id_rsa.pub. You can then compare this fingerprint with the one you have received from the expected user to verify its authenticity.
d. ssh-keygen -lf ~/.ssh/known_hosts: This command
Similar Questions
Which of the following commands can be used to copy an SSH public key to a remote server, allowing the owner of the corresponding private key to log in without a password?Question 13Answera.ssh-copy-id user@remote_hostb.ssh user@remote_host "echo $(cat ~/.ssh/id_rsa.pub) >> ~/.ssh/authorized_keys"c.scp ~/.ssh/id_rsa.pub user@remote_host:~/.ssh/authorized_keysd.echo "$(cat ~/.ssh/id_rsa.pub)" | ssh user@remote_host "cat >> ~/.ssh/authorized_keys"
Which of the following commands can be used to remove an SSH key from the ~/.ssh/authorized_keys file on a remote server, revoking access to the corresponding user?Question 3Answera.ssh-keygen -R user@remote_hostb.grep -v "ssh-.*user@remote_host" ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmpc.ssh-keygen -f "~/.ssh/known_hosts" -R user@remote_hostd.sed -i '/^ssh-.*user@remote_host$/d' ~/.ssh/authorized_keys
Which of the two ssh keys cannot be transferred to anyone?1 point possiblePrivate (file id_rsa)Public (file id_rsa.pub)
Which of the following commands can be used to generate an RSA key pair for use with an SSH server on a Linux system?Question 12Answera.ssh-keygen -t dsab.ssh-keygen -t ed25519c.ssh-keygen -t ecdsad.ssh-keygen -t rsa
Which of the following commands can be used to generate an RSA key pair for use with an SSH server on a Linux system?Select one:a.ssh-keygen -t rsab.ssh-keygen -t ecdsac.ssh-keygen -t ed25519d.ssh-keygen -t dsa
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.