LLevelUp
0
← Back to topic

SSH Keys and Hardening

SSH is the normal way to administer a VPS. Key-based login is safer than password login because the private key stays on your machine.

ssh-keygen -t ed25519 -C "[email protected]"
ssh user@server-ip

Hardening usually means editing /etc/ssh/sshd_config:

PasswordAuthentication no
PermitRootLogin no

Then reload SSH:

sudo systemctl reload ssh

CAUTION

Keep one active SSH session open while changing SSH settings. Test a second login before closing the first session.

Further Learning

  • “OpenSSH authorized_keys” — key-based auth
  • “sshd_config PasswordAuthentication” — disabling password login
  • “SSH hardening VPS” — practical security baseline