Correct answersA. Set ~/.ssh to mode 700 and authorized_keys to mode 600, owned by dana, so the sshd StrictModes check passesC. Confirm that key login works in a second session before setting PasswordAuthentication no and reloading sshdD. Generate a key pair with ssh-keygen on the client and append the public key to dana's ~/.ssh/authorized_keys on the server
AWhy this is right: StrictModes makes sshd refuse keys if ~/.ssh or authorized_keys is writable by others.
BWhy not this: The private key must stay on the client; authorized_keys holds only public keys.
CWhy this is right: Testing key login in a second session before disabling passwords avoids locking yourself out.
DWhy this is right: ssh-keygen makes the pair on the client and the public key is appended to authorized_keys.
EWhy not this: ssh_host_* files are the server's own host keys; user keys belong in that user's authorized_keys.
FWhy not this: PermitRootLogin governs only root; PasswordAuthentication is what turns off passwords for all users.
The public key goes in authorized_keys, permissions must satisfy StrictModes, and testing in a second session prevents a lockout. The private key must never leave the client; authorized_keys holds only public keys. The ssh_host files hold the server's own host keys, and PermitRootLogin controls only root's logins.