SSH is the backbone of server access. Doing it right saves a lot of headaches.
Create Individual Keys
Each developer generates an SSH key:
ssh-keygen -t ed25519 -C "[email protected]"
Add Keys to the Server
mkdir -p ~/.ssh
echo "ssh-ed25519 AAAA... user@host" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
Disable Password Login
Add or update these two lines in your /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin no
Then restart the SSH service with sudo systemctl restart sshd.
Optional: Restrict Users by IP
In the same file, you can use the AllowUsers user@host to limit access by IP address.
This keeps your servers secure while letting multiple developers work without shared credentials.