Skip to main content
1 of 3
GaretJax
  • 520
  • 1
  • 5
  • 18

Apparently, the private key I was using on my machine was an old one. My key did not contain the encryption information added to the private key file if I generate a new one:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-...

To obviate to the problem, I decrypted the key with openssl:

$ cd ~/.ssh
$ cp id_rsa id_rsa.bck
$ openssl rsa -in id_rsa -out id_rsa

...and then re-encrypted it:

$ openssl rsa -in id_rsa -aes256 -out id_rsa
$ chmod 0600 id_rsa

And just in case, regenerate the public key as well:

$ ssh-keygen -y -f id_rsa > id_rsa.pub
GaretJax
  • 520
  • 1
  • 5
  • 18