Win32-OpenSSH
Win32-OpenSSH copied to clipboard
Version 8.1 doesn't support keys with passphrase generated by the 7.7.2.0 version
Steps:
- 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
- enter passphrase
This generates a key that isn't compatible with the 8.1.0.0 version
For example:
- 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
Looks similar to the #973
Workaround (using PuTTYgen): https://serverfault.com/a/1043095/238181
This worked for me:
openssl pkey < key_rsa > key_rsa.pkcs8
ssh-keygen -p -f key_rsa.pkcs8
move key_rsa.pkcs8 key_rsa
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.