1

This is a very basic question, do bear with me.. I'm setting up a VPS and it seems as though disabling SSH users from logging in with a password is recommended for security.

If I authorize the SSH key for my desktop, what happens if that desktop goes kaput? Won't I entirely lose access to the VPS? If so, it seems like a risky thing to do.

1
  • 3
    Ever heard of that magic concept of a backup for important things like e.g. SSH keys?
    – Sven
    May 19, 2014 at 7:06

4 Answers 4

11

Store your keys somewhere else which is safe, you know - have a backup and don't use keys without a pass phrase.

Make sure that the VPS that you order has out of band access via a console of some description which will allow you to log in via a username/password in the event that ssh is not available.

1
  • Haha, thanks. I have stupidly never thought of backing up SSH keys. May 19, 2014 at 7:27
6

Is it risky to disable SSH passwords?

No.


  1. Passphrase your keys.
  2. Backup your keys.
  3. Use a SSH manager so that you don't have to type the passphrase all the time.
  4. Password protect your SSH manager
3

I have been putting PasswordAuthentication no in /etc/ssh/sshd_config on multiple servers. The private key itself is encrypted with a strong password (130 bits of entropy), and the encrypted private key is stored in three different physical locations.

1

Save you ~/.ssh/ to a secure place (usb stick, cloud,...) and you can reuse the key with a new desktop.

Not the answer you're looking for? Browse other questions tagged .