Bird
0
0

What will happen if you run ssh-copy-id user@server after generating your SSH keys?

medium📝 Command Output Q13 of 15
Linux CLI - SSH and Remote Access
What will happen if you run ssh-copy-id user@server after generating your SSH keys?
AThe SSH service on the server restarts
BYour private key is copied to the server
CThe server's keys are copied to your local machine
DYour public key is copied to the server for passwordless login
Step-by-Step Solution
Solution:
  1. Step 1: Understand ssh-copy-id purpose

    This command copies your public key to the server's authorized keys file.
  2. Step 2: Identify what is copied

    Only the public key is copied, enabling passwordless login; private keys stay local.
  3. Final Answer:

    Your public key is copied to the server for passwordless login -> Option D
  4. Quick Check:

    ssh-copy-id copies public key to server [OK]
Quick Trick: ssh-copy-id copies public key, not private [OK]
Common Mistakes:
  • Thinking private key is copied
  • Believing server keys copy locally
  • Assuming ssh-copy-id restarts SSH

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes