A user reports that they cannot SSH to a remote server using the usual command 'ssh user@remote.example.com'. The administrator tests and gets 'Permission denied (publickey,gssapi-keyex,gssapi-with-mic)'. The user's public key is in ~/.ssh/authorized_keys on the remote server. The local client has the matching private key. Which step should the administrator take to resolve the issue?
Trap 1: Generate a new RSA key pair on the client with ssh-keygen.
Existing key is supposed to be correct.
Trap 2: Run 'ssh-add' to add the private key to the SSH agent.
Agent not needed if key is directly used.
Trap 3: Restart the sshd service on the client.
Client daemon not involved.
- A
Generate a new RSA key pair on the client with ssh-keygen.
Why wrong: Existing key is supposed to be correct.
- B
Run 'ssh-add' to add the private key to the SSH agent.
Why wrong: Agent not needed if key is directly used.
- C
Restart the sshd service on the client.
Why wrong: Client daemon not involved.
- D
Check /var/log/auth.log on the remote server to see why the key was rejected.
Server logs show the exact reason for key rejection.