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.
Correct answer C: Copy the id_rsa.pub file to the remote server. The key contents must be copied into the
∼/.ssh/authorized_keys file for your user account on the remote server. You can do that
using the cat command:
$ cat id_rsa.pub >> ∼/.ssh/authorized_keys
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
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.
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.
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.
~/.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
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.
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
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
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).
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"
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
lanc
Highly Voted 4 years, 6 months agoTheBroker
Highly Voted 4 years, 5 months agofjcsanchez
Most Recent 1 month, 2 weeks agoQualcuno
8 months agojorgevisentini
10 months, 2 weeks agojchavarria12
11 months agoMaikyCR28
1 year, 3 months agointre
1 year, 3 months agoQualcuno
8 months agolbellic
1 year, 9 months agoserlan
2 years agoClvd
2 years, 1 month agoremiset
2 years, 1 month agoQualcuno
8 months agodragonsoul
1 year, 9 months agomira_
2 years, 1 month agoQualcuno
8 months agoserlan
2 years, 2 months agoK1lroy
2 years, 5 months agoEMordenti
2 years, 6 months agoEMordenti
2 years, 6 months agoschif
2 years, 7 months agoschif
2 years, 7 months ago