Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I already have a ssh private key without a passphrase. As I have started to use it to login to a few critical and secure systems, I need to use a passphrase on my RSA private key. How can I enable passphrase on an already existing private key? Also I want to know how to backup the private kay before I enable passphrase, incase I mess up or forget the passphrase (only for some days untill I can commit the passphrase to my memory).

share|improve this question
up vote 11 down vote accepted

You could use the -p option to ssh-keygen:

ssh-keygen -p -f /path-to/key-file

It will prompt for old and new passphrase. It will also prompt for keyfile (with suggestion) if you do not provide -f key-file option.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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