Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

Version 8.1 doesn't support keys with passphrase generated by the 7.7.2.0 version

Open energister opened this issue 4 years ago • 4 comments

Steps:

  1. use x64 ssh-keygen from the 7.7.2.0 version to generate a key: ssh-keygen -b 2048 -C "[email protected]" -f new_rsa
  2. enter passphrase

This generates a key that isn't compatible with the 8.1.0.0 version

For example:

  1. run ssh-keygen on generated key: ssh-keygen -p -f new_rsa

And you'll get

Failed to load key new_rsa: invalid format

Same result will be with the ssh: ssh hostname

Load key "c:\\Users\\<user_name>\\.ssh\\new_rsa": invalid format

Client OperatingSystem OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19041 N/A Build 19041

energister avatar Nov 18 '20 17:11 energister

Looks similar to the #973

energister avatar Nov 18 '20 17:11 energister

Workaround (using PuTTYgen): https://serverfault.com/a/1043095/238181

energister avatar Nov 18 '20 18:11 energister

This worked for me:

openssl pkey < key_rsa > key_rsa.pkcs8
ssh-keygen -p -f key_rsa.pkcs8
move key_rsa.pkcs8 key_rsa

mletterle avatar Mar 08 '21 18:03 mletterle

What worked for me was to re-enable the "OpenSSH Authentication Agent" service on Windows (it was on manual for some reason). As soon as the service started, my old keys started to work again.

paulomanrique avatar Mar 31 '22 12:03 paulomanrique