Generate Keys (Linux/Mac)
ssh-keygen -t ed25519 -C "your@email.com"
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@server-ip
Disable Password Login
PasswordAuthentication no
PubkeyAuthentication yes
sudo systemctl restart sshd ssh-keygen -t ed25519 -C "your@email.com"
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@server-ip
PasswordAuthentication no
PubkeyAuthentication yes
sudo systemctl restart sshd