Back to Labs
SSH Key AuthenticationMedium
LinuxSecurity
👥 18 users20 min200 points

Set up SSH key-based authentication and disable password login.

Instructions

  1. Generate an SSH key pair.
  2. Copy the public key to the server's authorized_keys.
  3. Disable password authentication in sshd_config and restart SSH.

Prerequisites

  • Basic SSH usage
  • Server access

Hints

  • Use 'ssh-keygen' to generate keys.
  • Use 'ssh-copy-id' or manually append to ~/.ssh/authorized_keys.
  • Edit /etc/ssh/sshd_config and set 'PasswordAuthentication no'.

Try it yourself!