-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key created with WSL Linux 'Invalid Format' #1481
Comments
I'm getting this on my RSA key that is password protected. I have an AES-128-CBC rsa key that is password protected. I'm beginning to think the Windows ssh including Win32-OpenSSH just doesn't support this kind of key. |
Digging into this, if you password protect a key using Libressl on Windows the delimiter for the private key is drastically different from that used to protect a key using OpenSSL on Linux. Windows is using OpenSSH 8.0 and the one I installed via Chocolatey was built with Libressl.
Well, this is fun, I can open the file using openssl/libressl as long as I specify the path in Windows format exclusively. So that's a dead end. It looks like it is specifically an issue with ssh/ssh-add. Meanwhile, Ubuntu WSL is using OpenSSH 7.6p1 built with OpenSSL 1.0.2n. EDIT: Okay, looks like it comes down to a change that occurred in OpenSSH 7.8-they changed the format of the private keys, so this is a problem from upstream? |
Can you try this on the latest version? Please open a new issue if you see this again. |
I am getting this issue as well with version
|
"OpenSSH for Windows" version
Server OperatingSystem
Linux myhost.mydomain.com 4.19.0-kali4-amd64 #1 SMP Debian 4.19.28-2kali1 (2019-03-18) x86_64 GNU/Linux
Client OperatingSystem
Microsoft Windows [Version 10.0.18362.418]
What is failing
After creating a SSH key on WSL Kali Linux, I move the keys to C:\Users\me.ssh
When connecting to the server, it never prompts me for my passphrase, and the output seems to show that the id_rsa key is in an invalid format.
It should be noted i have tried this with id_rsa and id_rsa.pub both converted to Linux EoL mode and Windows EoL mode with Notepad++, as suggested in this issue (#1315). However both have the same output.
Expected output
The expected output should prompt the user for the passphrase, this line:
Full output:
Actual output
Output on windows showing it failing to load the id_rsa key due to an invalid format, but one that works on linux/WSL.
Full Output:
The text was updated successfully, but these errors were encountered: