202-450 Exam QuestionsBrowse all questions from this exam

202-450 Exam - Question 11


The content of which local file has to be transmitted to a remote SSH server in order to be able to log into the remote server using SSH keys?

Show Answer
Correct Answer: AC

To log into a remote SSH server using SSH keys, you need to transmit the content of your public key to the remote server. This public key is stored in the file ~/.ssh/id_rsa.pub on your local machine. The content of this file needs to be added to the ~/.ssh/authorized_keys file on the remote server. This allows the server to recognize and authenticate the SSH key for logins.

Discussion

17 comments
Sign in to comment
lancOption: C
Jun 4, 2020

the answer should be C ~/.ssh/id_rsa.pub

TheBrokerOption: C
Jun 17, 2020

I agree with Ianc. The answer should be C. The authorized_keys contains the list of public keys that are authorized to access. The "id_rsa.pub" contains the public key of the client and it's append in the remote server into the authorized_keys file.

MaikyCR28Option: C
Sep 1, 2023

To log into a remote SSH server using SSH keys, you need to transmit the content of your public key to the remote server. The public key is usually stored in a file named ~/.ssh/id_rsa.pub (option C). So, the correct answer is: C. ~/.ssh/id_rsa.pub This public key file needs to be added to the ~/.ssh/authorized_keys file on the remote server to grant you access using SSH keys.

thefarmerOption: C
Sep 16, 2021

Yes, it should be C. I've done it manully without running ssh-copy-id command.

remisetOption: A
Oct 12, 2022

~/.ssh/id_rsa.pub is the file to be copy. The question ask about the CONTENT of local file. If you copy the authorized_keys, you are able to use a remote server, because the authorized_keys has the pub key. Then, the correct answer is A

dragonsoul
Mar 6, 2023

the content of ~/.ssh/id_rsa.pub file need to be copy to remote servers authorized_keys file. The local machine doesn't even need to have authorized_keys file. The answer is C

Qualcuno
Apr 2, 2024

I agree with dragonsoul: if you copy the file "authorized_keys" to the server, then the server will accept only connections from clients which have one of the keys listed there. They are not guaranteed to be the ones you want, since the client's "authorized_keys" file, if it exists at all, may contain keys that have nothing to do with the server.

ClvdOption: C
Oct 14, 2022

C 100%

jchavarria12Option: C
Jan 4, 2024

C is the right one

schifOption: D
May 2, 2022

authorized_keys = public keys that are authorized to access. id_rsa.pub contains = public key of the client that should be added into the authorized_keys file of remote server.

schif
May 2, 2022

Can you correct to C answer ?

EMordentiOption: C
May 30, 2022

I think that "A" "~/.ssh/authorised_keys" is a file used on the SSH server side to store the SSH public key of a trusted user. This is the correct answer. "~/.ssh/config" is the file used by the SSH client to configure SSH. "~/.ssh/id_rsa.pub" is the file containing the user's SSH public key. "~/.ssh/id_rsa" is the file containing the user's SSH private key. "~. /ssh/known_hosts" is the file that stores the public key of the trusted SSH server (the public key of the SSH server itself is stored in "/etc/ssh/ssh_host_TYPE_key.pub", where "TYPE" is the encryption method).

EMordenti
Jun 2, 2022

Sorry. The answer is C Looking at the link to the explanation it says the following: "To authenticate using SSH keys, a user must have an SSH key pair on their local computer. On the remote server, the public key must be copied to a file within the user’s home directory at ~/.ssh/authorized_keys. This file contains a list of public keys, one-per-line, that are authorized to log into this account". The question refers to the local file, not the server file. The local file is id_rsa.pub, the server file is authorized_keys. So, the answer should be "C"

K1lroyOption: C
Jun 22, 2022

The question is regarding a LOCAL file that should be placed on remote server. ~/.ssh/id_rsa.pub is the LOCAL file that will "become" a authorized_keys on the remote

serlanOption: C
Oct 6, 2022

The answer should be C.

mira_Option: A
Oct 9, 2022

Read the question as _which file should be copied?_ and think _source and destion file_ remain the same.

Qualcuno
Apr 2, 2024

The file "authorized_keys" doesn't need to be copied. It should remain local on the server. So the answer is C

serlanOption: C
Nov 30, 2022

I think its C

lbellicOption: C
Feb 14, 2023

C is the answer . The question is referring to the file you need to copy in a server for authenticate by ssh-key pair handshake.

intreOption: A
Aug 19, 2023

The question is referring to the CONTENT of the file that is LOCAL ON THE SERVER. So, the client needs to trasmit data that match the content of authorized_keys on the server. The question is really ambigous though.

Qualcuno
Apr 2, 2024

I don't interpret the question that way: local is the machine that is connecting (from) the server is the machine that the user is connecting to. The file ~/.ssh/authorized_keys doesn't need to exist on the client (local) machine. it needs to exist on the server and contain the public keys that are authorized to access said server. So the answer should be C.

jorgevisentiniOption: C
Jan 21, 2024

The correct answer is C ssh-copy-id username@remote_host The utility will connect to the account on the remote host using the password you provided. It will then copy the contents of your ~/.ssh/id_rsa.pub key into a file in the remote account’s home ~/.ssh directory called authorized_keys. https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

QualcunoOption: C
Apr 2, 2024

Correct answer is C.