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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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.