13

I generated DSA key using ubuntu. Saved the public key on remote server, such that keys are required before connecting ssh.

I have forgot the passphrase for that key. How can I retrieve it?

13

If it was a reasonably secure password, the answer is probably "not at all". According to the ssh-keygen man page, the private key is encrypted using 128bit AES. Although this algorithm has some weaknesses, the complexity is still high enough to make it reasonably secure. So, assuming a strong password and highly parallel decryption (for instance using GPGPU) having 210 threads, each having a very optimistic rate of 230 operations per second, after a day of time, you could have run about 256 operations. With an effective complexity of around 2100, it would take about 3 billion years to break the key...

If it was an insecure password, you might have a chance to break it with brute force though. It seems the community enhanced edition John the Ripper has a GPGPU module for brute-force attacks on OpenSSH key files (didn't try it, I don't use proprietary drivers).

By thy way, a similar question, not about retrieving the key, but instead breaking the encryption itself was already asked.

| improve this answer | |
  • Considering the complexity of task I managed to add new keys. :P – Chirag Sep 16 '13 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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