Passwordless SSH
Generate SSH keys, configure authorized_keys, and harden key permissions.
A intermediate Linux challenge worth 10 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The CI/CD pipeline needs to deploy to the app servers without password prompts. You need to set up SSH key-based authentication.
Your tasks:
- Generate an RSA SSH key pair (no passphrase) at the default location
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa
- Add your public key to ~/.ssh/authorized_keys
- Set correct permissions:
- ~/.ssh directory: 700
- ~/.ssh/authorized_keys: 600
Commands to learn: ssh-keygen, cat >>, chmod 600, chmod 700
Run check when done.