You are not logged in.
Every day, I boot my machine and then type in 'ssh-add' to add my ssh key. This has been working for years. Looking at my id_rsa file, it hasn't been touched since Nov. 2011.
Today, though, I ran it and got:
$ ssh-add
Error loading key "/home/jdarnold/.ssh/id_rsa": invalid format
the ~/.ssh/id_rsa file looks just fine. Has something change in ssh-add that obsoleted my id_rsa file? Anything else I can check?
Offline
Hi, I had the same problem and resolved it by rencoding the private key with openssl:
cd .ssh
cp id_rsa id_rsa.oldy
openssl rsa -in id_rsa.oldy -out id_rsa.no_pass
openssl rsa -aes256 -in id_rsa.no_pass -out id_rsa
rm id_rsa.no_pass
I'm still browsing the openssh/openssl git to understand what triggered this.
Interestingly, the default key length changed (I generated this key on 2018-01-10), before:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,
after:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,
HTH
Last edited by chripell (2018-08-25 12:17:07)
Offline