LPIC-2 Network Client Management Practice Question
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?
⚠ Common exam trap
Candidates often assume the key pair is the problem and jump to regenerating keys or using ssh-add, when the real issue is often a server-side configuration or permission problem that can only be diagnosed by examining the remote server's authentication logs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Check /var/log/auth.log on the remote server to see why the key was rejected.
The error message indicates that the SSH server rejected all offered authentication methods, including publickey. Since the user's public key is in the remote server's authorized_keys file and the client has the matching private key, the most likely cause is a file permission or SELinux/AppArmor issue on the remote server, or a key format mismatch. Checking /var/log/auth.log on the remote server will show the exact reason for the rejection, such as 'bad permissions' or 'key not recognized', allowing targeted troubleshooting.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Generate a new RSA key pair on the client with ssh-keygen.
Why it's wrong here
Existing key is supposed to be correct.
- ✗
Run 'ssh-add' to add the private key to the SSH agent.
Why it's wrong here
Agent not needed if key is directly used.
- ✗
Restart the sshd service on the client.
Why it's wrong here
Client daemon not involved.
- ✓
Check /var/log/auth.log on the remote server to see why the key was rejected.
Why this is correct
Server logs show the exact reason for key rejection.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.