Current situation: Windows Client and Server with Windows OpenSSH installed. I was previously able to connect the server and am no longer able to.
I am still able to SSH into the server via the terminal. And am able to SSH into other similar machines.
I have tried many things to try to solve this, mainly:
known_hosts
.vscode_server
-> this has not regenerated on server[09:46:45.214] Log Level: 2
[09:46:45.230] SSH Resolver called for "ssh-remote+pvc-ftt-3", attempt 1
[09:46:45.230] "remote.SSH.useLocalServer": false
[09:46:45.231] "remote.SSH.showLoginTerminal": false
[09:46:45.231] "remote.SSH.remotePlatform": {"129.97.68.241":"linux","192.168.1.231":"linux","pvc-ftt-6":"windows"}
[09:46:45.231] "remote.SSH.path": undefined
[09:46:45.231] "remote.SSH.configFile": undefined
[09:46:45.231] "remote.SSH.useFlock": true
[09:46:45.231] "remote.SSH.lockfilesInTmp": false
[09:46:45.231] "remote.SSH.localServerDownload": auto
[09:46:45.231] "remote.SSH.remoteServerListenOnSocket": false
[09:46:45.231] "remote.SSH.showLoginTerminal": false
[09:46:45.232] "remote.SSH.defaultExtensions": []
[09:46:45.232] "remote.SSH.loglevel": 2
[09:46:45.232] "remote.SSH.enableDynamicForwarding": true
[09:46:45.232] "remote.SSH.enableRemoteCommand": false
[09:46:45.232] "remote.SSH.serverPickPortsFromRange": {}
[09:46:45.232] "remote.SSH.serverInstallPath": {}
[09:46:45.235] VS Code version: 1.81.1
[09:46:45.235] Remote-SSH version: [email protected]
[09:46:45.235] win32 x64
[09:46:45.238] SSH Resolver called for host: pvc-ftt-3
[09:46:45.238] Setting up SSH remote "pvc-ftt-3"
[09:46:45.242] Using commit id "6c3e3dba23e8fadc360aed75ce363ba185c49794" and quality "stable" for server
[09:46:45.246] Install and start server if needed
[09:46:46.728] Checking ssh with "C:\Program Files\Google\Chrome\Application\ssh.exe -V"
[09:46:46.732] Got error from ssh: spawn C:\Program Files\Google\Chrome\Application\ssh.exe ENOENT
[09:46:46.733] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[09:46:46.735] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[09:46:46.736] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[09:46:46.738] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[09:46:46.738] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[09:46:46.741] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[09:46:46.742] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[09:46:46.745] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[09:46:46.745] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[09:46:46.905] > OpenSSH_for_Windows_8.6p1, LibreSSL 3
[09:46:46.906] > .4.3
[09:46:46.912] Remote command length: 6211/8192 characters
[09:46:46.912] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 59772 "pvc-ftt-3" powershell
[09:46:46.918] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[09:46:47.792] > alab@pvc-ftt-3's password:]0;C:\WINDOWS\System32\cmd.exe
[09:46:47.792] Got some output, clearing connection timeout
[09:46:47.793] Showing password prompt
[09:46:53.517] Got password response
[09:46:53.519] "install" wrote data to terminal: "********************"
[09:46:53.584] >
[09:46:54.097] > powershell : The term 'powershell' is not recognized as the name of a cmdlet, function, script
> file, or operable program. Check the spelling of the name, or if a path was included, verify that
> the path is correct and try again.
> At line:1 char:1
> + powershell
> + ~~~~~~~~~~
> + CategoryInfo : ObjectNotFound: (powershell:String) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
>
[09:46:55.434] "install" terminal command done
[09:46:55.435] Install terminal quit with output:
[09:46:55.435] Received install output:
[09:46:55.437] Resolver error: Error:
at m.Create (c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:584145)
at c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:581833
at t.handleInstallOutput (c:\Users\kchandan\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:582627)
at t.tryInstall (c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:681881)
at async c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:644110
at async t.withShowDetailsEvent (c:\Users\kchandan\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:647428)
at async t.resolve (c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:645160)
at async c:\Users\me\.vscode\extensions\ms-vscode-remote.remote-ssh-0.102.0\out\extension.js:1:720916
[09:46:55.448] ------
I am still unable to connect via VSCode SSH, and would like to resolve this.
After much debugging, OpenSSH/ssh.exe was missing from the environment variables. I had to add that back in.