vscode-remote-workspace icon indicating copy to clipboard operation
vscode-remote-workspace copied to clipboard

Unable to connect via sftp using key file

Open raff2145 opened this issue 5 years ago • 1 comments

I'm unable to connect to my server via sftp when using the key=id_rsa parameter in the uri. Here is what I have in my .code-workspace file:

{ "folders": [ { "uri": "sftp://[email protected]/data/?key=libre_server&debug=1", "name": "libre-server/data" } ] }

Here is a notification I get when trying to connect with my id file in the key parameter:

Cannot parse privateKey: Unsupported key format

I can connect just fine to the same server just fine if I use a login passphrase in the uri like so:

{ "folders": [ { "uri": "sftp://sftpuser:[email protected]/data/?debug=1", "name": "libre-server/data" } ] }

I don't believe this is an issue with my id file, because I can connect to this server via sftp just fine outside of vs code with the same id file. Anyone know what I'm doing wrong here?

raff2145 avatar Mar 03 '19 01:03 raff2145

Try to use full path of your key or you can keep the key in .ssh folder of your user directory eg C:\User\sample.ssh\libre_server

solaris7x avatar Mar 25 '19 20:03 solaris7x