Bird
0
0

You want to automate disabling password authentication and enabling SSH key login on your Raspberry Pi. Which sequence of commands is correct?

hard🚀 Application Q9 of 15
Raspberry Pi - Security and Deployment
You want to automate disabling password authentication and enabling SSH key login on your Raspberry Pi. Which sequence of commands is correct?
AEdit /etc/ssh/sshd_config to set PasswordAuthentication no, then run sudo systemctl restart ssh
BRun sudo ufw disable, then generate SSH keys
CDelete all SSH keys, then reboot the Raspberry Pi
DEnable password login in sshd_config, then restart SSH service
Step-by-Step Solution
Solution:
  1. Step 1: Know how to disable password login

    Edit the sshd_config file to set PasswordAuthentication no disables password login.
  2. Step 2: Restart SSH service to apply changes

    Running 'sudo systemctl restart ssh' applies the new settings.
  3. Final Answer:

    Edit /etc/ssh/sshd_config to set PasswordAuthentication no, then run sudo systemctl restart ssh -> Option A
  4. Quick Check:

    Disable password login = edit sshd_config + restart SSH [OK]
Quick Trick: Disable passwords in sshd_config and restart SSH [OK]
Common Mistakes:
MISTAKES
  • Disabling firewall instead of password login
  • Deleting keys unnecessarily
  • Enabling password login by mistake

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes