I have installed VSCode (v1.62.3) using Windows (v10.0.19043), and have installed WSL2 (ubuntu 20.04) distribution.
I reopen a folder in WSL and with WSL2 terminal i have setup my ssh keys (/home/user/.ssh/ssh-privatefile), so if i went to the WSL2 terminal within VSCode i can ssh username@IP
to a linux instance just fine with a connection.
What i am trying to do from this WSL2 folder is perform a Remote-SSH connection to the very same Linux server, so i can see filesystem too
I have set up a config file (/home/user/.ssh/configfile) and for the remote-ssh settings i am referencing this file.
Host SomeName
Hostname IP
User username
IdentityFile /home/user/.ssh/ssh-privatefile
When i try to connect to this remote ssh in a new window i get an error of "Could not establish connection to SomeName"
With the error of the below, which tells me is that VSCode is trying to reference a windows path no such identity: /home/user/.ssh/ssh-privatefile: No such file or directory
Any ideas how to resolve?
Thanks
[16:02:13.461] Log Level: 2
[16:02:13.546] [email protected]
[16:02:13.547] win32 x64
[16:02:13.547] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a226261734a50556174227d", attempt 1
[16:02:13.548] "remote.SSH.useLocalServer": false
[16:02:13.548] "remote.SSH.showLoginTerminal": false
[16:02:13.548] "remote.SSH.remotePlatform": {}
[16:02:13.548] "remote.SSH.path": undefined
[16:02:13.549] "remote.SSH.configFile": /home/user/.ssh/configfile
[16:02:13.549] "remote.SSH.useFlock": true
[16:02:13.549] "remote.SSH.lockfilesInTmp": false
[16:02:13.549] "remote.SSH.localServerDownload": auto
[16:02:13.549] "remote.SSH.remoteServerListenOnSocket": false
[16:02:13.549] "remote.SSH.showLoginTerminal": false
[16:02:13.549] "remote.SSH.defaultExtensions": []
[16:02:13.549] "remote.SSH.loglevel": 2
[16:02:13.549] SSH Resolver called for host: basJPUat
[16:02:13.549] Setting up SSH remote "basJPUat"
[16:02:13.579] Using commit id "ccbaa2d27e38e5afa3e5c21c1c7bef4657064247" and quality "stable" for server
[16:02:13.582] Install and start server if needed
[16:02:21.163] Checking ssh with "ssh -V"
[16:02:21.250] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
[16:02:21.255] Using SSH config file "/home/user/.ssh/configfile"
[16:02:21.255] Running script with connection command: ssh -T -D 53694 -F "/home/user/.ssh/configfile" "basJPUat" bash
[16:02:21.258] Terminal shell path: C:\Windows\System32\cmd.exe
[16:02:21.514] > ]0;C:\Windows\System32\cmd.exe
[16:02:21.514] Got some output, clearing connection timeout
[16:02:21.589] > The authenticity of host 'IP (IP)' can't be established.
> ECDSA key fingerprint is SHA256:LAFCfhMRJbGsIkeEH6Iy5YfVRtCKGMxIP+6peEvd5f0.
> Are you sure you want to continue connecting (yes/no/[fingerprint])?
[16:02:21.589] Detected fingerprint confirmation message
[16:02:21.590] Showing fingerprint confirmation dialog
[16:02:23.264] Got fingerprint response: yes
[16:02:23.265] "install" wrote data to terminal: "yes"
[16:02:23.277] > y
[16:02:23.299] > Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
> Failed to add the host to the list of known hosts (C:\\Users\\my-user/.ssh/kn
> own_hosts).
[16:02:23.328] > no such identity: /home/user/.ssh/ssh-privatefile: No such file or directory
[16:02:23.346] > userName@IP: Permission denied (publickey).
> The process tried to write to a nonexistent pipe.
>
[16:02:24.625] "install" terminal command done
[16:02:24.625] Install terminal quit with output:
[16:02:24.625] Received install output:
[16:02:24.626] Resolver error: Error:
at Function.Create (c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:429193)
at c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:427209
at Object.t.handleInstallOutput (c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:427772)
at Object.t.tryInstall (c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:521703)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:485356
at async Object.t.withShowDetailsEvent (c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:488706)
at async Object.t.resolve (c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:486435)
at async c:\Users\my-user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.66.1\out\extension.js:1:560057
[16:02:24.632] ------