Bird
0
0

You want to automate SSH login to multiple servers without passwords. Which sequence of commands is correct?

hard📝 Application Q15 of 15
Linux CLI - SSH and Remote Access
You want to automate SSH login to multiple servers without passwords. Which sequence of commands is correct?
Assh user@server -> ssh-copy-id user@server -> ssh-keygen
Bssh-copy-id user@server -> ssh-keygen -> ssh user@server
Cssh-keygen -> ssh-copy-id user@server -> ssh user@server
Dssh user@server -> ssh-keygen -> ssh-copy-id user@server
Step-by-Step Solution
Solution:
  1. Step 1: Generate SSH keys first

    Use ssh-keygen to create your key pair locally.
  2. Step 2: Copy public key to server

    Use ssh-copy-id user@server to add your public key to the server.
  3. Step 3: Connect without password

    Now ssh user@server logs in using the key without asking for a password.
  4. Final Answer:

    ssh-keygen -> ssh-copy-id user@server -> ssh user@server -> Option C
  5. Quick Check:

    Generate keys, copy key, then connect [OK]
Quick Trick: Generate keys first, then copy, then connect [OK]
Common Mistakes:
  • Copying keys before generating them
  • Trying to connect before copying keys
  • Mixing command order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes