0

I have tried to connect to my amazon instance through SSH before through a program called Bitvise SSH, but today I found out there is a way to directly connect to my instance through a function in VSCode.

my config

This is my config file for the SSH connection for the VS code SSH connection.

And apparently when I try to connect to the instance I get the error

[15:49:16.843] Log Level: 2
[15:49:16.846] remote-ssh@0.70.0
[15:49:16.846] win32 x64
[15:49:16.847] SSH Resolver called for "ssh-remote+ec2-user", attempt 1
[15:49:16.847] "remote.SSH.useLocalServer": false
[15:49:16.848] "remote.SSH.showLoginTerminal": false
[15:49:16.848] "remote.SSH.remotePlatform": {}
[15:49:16.848] "remote.SSH.path": undefined
[15:49:16.848] "remote.SSH.configFile": C:\Users\algoo\.ssh\config\
[15:49:16.848] "remote.SSH.useFlock": true
[15:49:16.848] "remote.SSH.lockfilesInTmp": false
[15:49:16.848] "remote.SSH.localServerDownload": auto
[15:49:16.848] "remote.SSH.remoteServerListenOnSocket": false
[15:49:16.849] "remote.SSH.showLoginTerminal": false
[15:49:16.849] "remote.SSH.defaultExtensions": []
[15:49:16.849] "remote.SSH.loglevel": 2
[15:49:16.849] "remote.SSH.serverPickPortsFromRange": {}
[15:49:16.849] "remote.SSH.enableDynamicForwarding": true
[15:49:16.849] "remote.SSH.serverInstallPath": {}
[15:49:16.850] SSH Resolver called for host: ec2-user
[15:49:16.850] Setting up SSH remote "ec2-user"
[15:49:16.886] Using commit id "899d46d82c4c95423fb7e10e68eba52050e30ba3" and quality "stable" for server
[15:49:16.890] Install and start server if needed
[15:49:19.539] Checking ssh with "ssh -V"
[15:49:19.607] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.3.3

[15:49:19.614] Using SSH config file "C:\Users\algoo\.ssh\config\"
[15:49:19.614] Running script with connection command: ssh -T -D 59628 -F "C:\Users\algoo\.ssh\config\" "ec2-user" bash
[15:49:19.617] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:49:19.860] > u]0;C:\WINDOWS\System32\cmd.exe
[15:49:19.861] Got some output, clearing connection timeout
[15:49:19.874] > sage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
>            [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
>            [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
>            [-i identity_file] [-J [user@]host[:por
[15:49:19.889] > t]] [-L address]
>            [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
>            [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
>            [-w local_tun[:remote_tun]] destination [command]
> The process tried to write to a nonexistent pipe.
[15:49:21.170] "install" terminal command done
[15:49:21.171] Install terminal quit with output:            [-w local_tun[:remote_tun]] destination [command]
[15:49:21.171] Received install output:            [-w local_tun[:remote_tun]] destination [command]
[15:49:21.172] Failed to parse remote port from server output
[15:49:21.173] Resolver error: Error: 
    at Function.Create (c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:430425)
    at Object.t.handleInstallOutput (c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:429068)
    at Object.t.tryInstall (c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:524212)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:487216
    at async Object.t.withShowDetailsEvent (c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:490561)
    at async Object.t.resolve (c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:488295)
    at async c:\Users\algoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:564197
[15:49:21.177] ------




[16:02:54.387] ConfigFileWatcher: start watching file:///c%3A/Users/algoo/.ssh/config/
[16:02:54.387] ConfigFileWatcher: adding save listener
[16:02:54.387] ConfigFileWatcher: adding close listener

is there anything that i missed out?

Alex Jung
  • 1
  • 1

1 Answers1

0
[15:49:16.848] "remote.SSH.path": undefined

^^^ Try setting the remote.SSH.path in settings.json and see if that works. I use the one that comes with Git Bash

These are my settings by the way:

  "remote.SSH.enableDynamicForwarding": false,
  "remote.SSH.lockfilesInTmp": true,
  "remote.SSH.path": "%ProgramFiles/Git/usr/bin/ssh.exe",
  "remote.SSH.useLocalServer": true,
nntrn
  • 416
  • 2
  • 7
  • So the interesting thing was I followed several answers that might be helpful to me. All of my solutions encluded, as you answered me above, useLocalServer, Kill hose vsCode, delete KnownHosts in the .ssh folder, using puttyGen to make a key and a few more, but i cant tell which one did the trick... – Alex Jung Jan 29 '22 at 18:57