SSH keys are safer and more convenient than passwords — here's the full setup.
Generate your key pair (on your PC)
ssh-keygen -t ed25519
Two files are created: id_ed25519 (private, never share) and id_ed25519.pub (public, to install).
Install the public key on the VPS
ssh-copy-id myuser@YOUR_IP
Or manually:
mkdir -p ~/.ssh
nano ~/.ssh/authorized_keys # paste your id_ed25519.pub contents
chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
Disable password auth
sudo nano /etc/ssh/sshd_config
# PasswordAuthentication no
sudo systemctl reload ssh











