1. Generate a key pair on your local machine: ssh-keygen

  2. Copy the public key to your VPS: ssh-copy-id user@your-ip

  3. Edit the SSH config: sudo nano /etc/ssh/sshd_config

  4. Ensure PasswordAuthentication no is set

  5. Restart SSH: sudo systemctl restart sshd

This significantly increases login security by eliminating password-based access.

Was this answer helpful? 0 Users Found This Useful (0 Votes)