SSH is the backbone of server access. Doing it right saves a lot of headaches.
Create individual keys
Each developer generates an SSH key:
Bash
ssh-keygen -t ed25519 -C "[email protected]"Add keys to the server
Bash
mkdir -p ~/.ssh
echo "ssh-ed25519 AAAA... user@host" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.sshDisable password login
/etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin noThen restart SSH
Bash
sudo systemctl restart sshdOptional: restrict users by IP
Add AllowUsers [email protected].* to limit access.
This keeps your servers secure while letting multiple developers work without shared credentials.
Leave a Reply