Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by Sven, Tom O'Connor May 19 at 10:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Sven, Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

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

4 Answers 4

up vote 11 down vote accepted

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.

share|improve this answer
    
Haha, thanks. I have stupidly never thought of backing up SSH keys. –  Rahul Sekhar May 19 at 7:27

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
share|improve this answer

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.

share|improve this answer

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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.