Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, I tried to connect to a MySQL Database through an SSH tunnel as usual and it prompted me for the password to my ssh key. I entered it as usual and allthough I am 100% sure I entered the correct password, it kept asking and thus failed.

I tried other things like a pull from a github repo, logging onto a server and so forth. It seems like my ssh-key has a different password all of the sudden but date of last modification is more than a year ago.

What is going on? It'd be quite a bummer if I had to change my ssh-key.

I already tried to change it:

$ ssh-keygen -p -f ~/.old_ssh/id_rsa
Enter old passphrase:
Key has comment '/Users/noxoc/.old_ssh/id_rsa'
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.

However I still get the same behaviour.

Ran it again with -vvv:

$ ssh-keygen -vvv -p -f ~/.old_ssh/id_rsa
debug3: Incorrect RSA1 identifier
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>

That looks promising and bad at the same time.

share|improve this question
1  
Try running ssh with the -v switch (or possibly -vv for yet more details). Also, if you have access to the server-side logs, check to see if those contain anything of value. That you are able to change the private key passphrase strongly suggests that this isn't really about the private key passphrase at all, but rather something else. –  Michael Kjörling Oct 7 '13 at 11:53
    
@MichaelKjörling see updated question. This might get us somewhere. –  noxoc Oct 7 '13 at 12:01
    
I was thinking about ssh specifically (using it to try to connect and see what errors you get). It's really weird that you were able to change the passphrase once and not again. That smells a little like a barfed key file unfortunately. Do you have a backup to compare it against? –  Michael Kjörling Oct 7 '13 at 12:13
    
The easiest solution might very well be to just generate a new key. Since you shouldn't be using the same private key with more than one host anyway, it shouldn't be too hard to replace the public key on the remote host. –  Michael Kjörling Oct 7 '13 at 12:14

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.