2

I created an ssh key without a password that I use to ssh and mosh into several webservers. It's been working fine for about 3 months now. Today when trying to access one of our servers, it prompted me for a password.

I ran "ssh -vvv name-of-server" to confirm that the only thing keeping me from connecting to the server is the password requirement.

Changing the password requires the old password, which I don't have/ shouldn't exist. Does anyone have any idea what might be happening, or how I can get rid of the password requirement?

2 Answers2

3

Thank you to Garreth for pointing me in the right direction.

Unfortunately, this problem doesn't have a happy ending. I checked out the private key file and noticed that it began with these two lines:

Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,BCC23A5E16582F3D

Evidently this means that the key has been encrypted, and encrypted keys need a password to be used. I found this command for decrypting:

$ openssl rsa -in id_rsa -out id_rsa

But you need the password to decrypt. I tried copying and pasting the contents of the old RSA key to a new file, but I was prompted to enter a password to decrypt file as well. I'm deleting my old keypair and starting over. :(

0

The key has become corrupted in some way. Check it to make sure that no extra characters or lines got added to it (eg via been pasted in an email that wasn't plain text).

Check each individual line of the key in a plain text editor. There should be no blank characters at the end of any line, and no new lines beyond the key demarcation line.

Garreth McDaid
  • 2,427
  • 22
  • 34