Bird
0
0

What will happen if you run ssh -i ~/.ssh/id_rsa user@host and the private key file does not exist?

medium📝 Command Output Q5 of 15
Linux CLI - SSH and Remote Access
What will happen if you run ssh -i ~/.ssh/id_rsa user@host and the private key file does not exist?
APermission denied (publickey).
BConnected successfully without password.
Cssh: Could not open identity file ~/.ssh/id_rsa: No such file or directory.
DHost key verification failed.
Step-by-Step Solution
Solution:
  1. Step 1: Understand -i option

    -i specifies a private key file for authentication.
  2. Step 2: Check behavior if file missing

    SSH reports error that identity file cannot be opened.
  3. Final Answer:

    ssh: Could not open identity file ~/.ssh/id_rsa: No such file or directory. -> Option C
  4. Quick Check:

    Missing key file causes open error [OK]
Quick Trick: Missing key file causes open identity file error [OK]
Common Mistakes:
  • Expecting permission denied instead of file error
  • Assuming connection succeeds without key
  • Confusing with host key verification error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes