000-221 · Question #20
An administrator wants to run secure commands as user1 from hosta to hostb using OpenSSH. Which actions will configure SSH trust?
The correct answer is A. Create a public & private key on hosta. SSH key-based trust requires generating a key pair on the initiating host and distributing the public key to the destination host's authorized_keys file.
Question
An administrator wants to run secure commands as user1 from hosta to hostb using OpenSSH. Which actions will configure SSH trust?
Options
- ACreate a public & private key on hosta
- BCreate a public & private key on hostb
- CCreate a public & private key on hosta
- DCreate a public & private key on hosta
How the community answered
(32 responses)- A84% (27)
- B3% (1)
- C9% (3)
- D3% (1)
Why each option
SSH key-based trust requires generating a key pair on the initiating host and distributing the public key to the destination host's authorized_keys file.
Generating the public/private key pair on hosta is the correct starting point because hosta initiates the connection - the private key remains on hosta while the public key is appended to user1's ~/.ssh/authorized_keys on hostb. This allows hostb to verify hosta's identity without a password, establishing the trust relationship in the correct direction.
Keys must be generated on the initiating host (hosta), not the destination; generating them on hostb would configure trust for connections originating from hostb, not hosta.
Key generation alone does not establish trust - the public key must also be copied to hostb's authorized_keys file for the authentication to succeed.
Without completing the distribution of hosta's public key to hostb's authorized_keys, the key pair exists but SSH trust between the two hosts is not actually established.
Concept tested: OpenSSH key-based authentication and trust setup
Source: https://www.openssh.com/manual.html
Topics
Community Discussion
No community discussion yet for this question.