nerdexam
CompTIA

XK0-006 · Question #22

A systems administrator is configuring new Linux systems and needs to enable passwordless authentication between two of the servers. Which of the following commands should the administrator use?

The correct answer is A. ssh-keygen -t rsa $$ ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2. ssh-keygen -t rsa generates an RSA key pair. ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2 copies the public key to the remote server’s authorized_keys, enabling passwordless login.

Security Best Practices

Question

A systems administrator is configuring new Linux systems and needs to enable passwordless authentication between two of the servers. Which of the following commands should the administrator use?

Options

  • Assh-keygen -t rsa $$ ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2
  • Bssh-keyscan -t rsa $$ ssh-copy-id john@server2 -i ~/.ssh/key
  • Cssh-agent -i rsa $$ ssh-copy-id ~/.ssh/key john@server2
  • Dssh-add -t rsa $$ scp -rp ~/.ssh john@server2

How the community answered

(16 responses)
  • A
    88% (14)
  • C
    6% (1)
  • D
    6% (1)

Explanation

ssh-keygen -t rsa generates an RSA key pair. ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2 copies the public key to the remote server’s authorized_keys, enabling passwordless login.

Topics

#SSH key authentication#ssh-keygen#ssh-copy-id#passwordless auth

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice