how can I check my rsa passphrase?

20

9

I think I've forgotten my RSA passphrase again.

Is there a way to have my local command line prompt me for it so I can check if I at least what I remember it as is correct, so I don't needlessly change it?

Next time I'm writing it on a post-it ;)

joachim

Posted 2010-06-07T08:44:14.507

Reputation: 541

How are you using the RSA key - SSH login? Web server certificates? – Douglas Leeder – 2010-06-07T08:51:59.947

github and ssh login – joachim – 2010-06-07T12:37:35.700

Answers

28

Use:

ssh-keygen -y

-y      This option will read a private OpenSSH format file and
        print an OpenSSH public key to stdout.

Ex: $ ssh-keygen -y -f ~/.ssh/id_rsa_file This will prompt to "Enter passphrase:". Given a wrong passphrase it will say "load failed" otherwise it will print the OpenSSH public key to stdout.

Al Conrad

Posted 2010-06-07T08:44:14.507

Reputation: 381

6

Try ssh-keygen -p:

-p      Requests changing the passphrase of a private key file instead of
        creating a new private key.  The program will prompt for the file
        containing the private key, for the old passphrase, and twice for
        the new passphrase.

blahdiblah

Posted 2010-06-07T08:44:14.507

Reputation: 3 125