Skip to content
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

Cannot parse privateKey: Unsupported OpenSSH private key type: ssh-ed25519 #76

Open
colemickens opened this issue Jan 21, 2020 · 3 comments

Comments

@colemickens
Copy link

Describe the bug

I can't use my ed25519 key with this extension. It looks like simply bumping to the very next bugfix release of ssh2 would fix this: mscdex/ssh2#352

This extension is the most valuable extension across all of my VS Code instances. Thank you very much for developing it, and thank you for allowing it to work in Codium (whereas Microsoft's version does not).

To Reproduce
Steps to reproduce the behavior:

  1. Try to connect to a host using a ssh-ed25519 key.

Extension Logs - required

[trace] readFile /.vscode/settings.json
[trace] readFile /.vscode/tasks.json
[trace] readFile /.vscode/launch.json
[trace] readFile /.vscode/settings.json
[trace] readFile /.vscode/tasks.json
[trace] readFile /.vscode/launch.json
[trace] stat /.vscode/settings.json
[trace] stat /.vscode/tasks.json
[trace] stat /.vscode/launch.json
[trace] stat /.vscode/settings.json
[trace] stat /.vscode/tasks.json
[trace] stat /.vscode/launch.json
[trace] stat /
[trace] stat /.vscode/extensions.json
[trace] stat /.vscode/extensions.json
[error] Error: Cannot parse privateKey: Unsupported OpenSSH private key type: ssh-ed25519
	at Client.connect (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\node_modules\ssh2\lib\client.js:241:13)
	at c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:240:22
	at new Promise (<anonymous>)
	at SFTPFSProvider.<anonymous> (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:217:20)
	at Generator.next (<anonymous>)
	at c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:7:71
	at new Promise (<anonymous>)
	at __awaiter (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:3:12)
	at SFTPFSProvider._connectClient (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:216:16)
	at SFTPFSProvider.<anonymous> (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:73:25)
	at Generator.next (<anonymous>)
	at fulfilled (c:\Users\colem\.vscode-oss\extensions\liximomo.remotefs-0.0.16\out\src\fs-providers\SFTPFSProvider.js:4:58)
[ this error repeats ]
@mmarcato
Copy link

mmarcato commented Feb 9, 2022

I have the same issue with this. I changed the ssh key generation method.

ssh-keygen -m PEM -t ed25519

I overcame that problem, but I got a new one... "all configured authentication methods failed"

@yellow-sunshine
Copy link

When you generate an ssh file you can specify the encryption type. It seems ed25519 is not supported by Remote FS. If you create a new key and specify rsa then it will work:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/your_key
Of course this would require you to update the authorized_keys on the server with the pub. If you don't have control over the server then you will prob be looking to use something other than Remote FS until it supports ed25519

@pucicu
Copy link

pucicu commented Dec 12, 2024

hello, will you once add support of ed25519? it is more modern than rsa. would be nice to be able to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants