Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

up vote 5 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

 
discard

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.