2

I used this question as a reference, but it didn't work for me.

reference: Can't connect VS Code to Linux machine for remote development

I am getting this error on VS Code and have no clue why it fails...

[20:15:39.302] Log Level: 2
[20:15:39.308] remote-ssh@0.64.0
[20:15:39.308] win32 x64
[20:15:39.310] SSH Resolver called for "ssh-remote+akane", attempt 1
[20:15:39.311] "remote.SSH.useLocalServer": false
[20:15:39.312] "remote.SSH.showLoginTerminal": false
[20:15:39.312] "remote.SSH.remotePlatform": {}
[20:15:39.312] "remote.SSH.sshPath": undefined
[20:15:39.312] "remote.SSH.sshConfigurationFile": undefined
[20:15:39.313] "remote.SSH.useFlock": true
[20:15:39.313] "remote.SSH.lockfilesInTmp": false
[20:15:39.313] "remote.SSH.localServerDownload": auto
[20:15:39.313] "remote.SSH.remoteServerListenOnSocket": false
[20:15:39.313] "remote.SSH.showLoginTerminal": false
[20:15:39.314] "remote.SSH.defaultExtensions": []
[20:15:39.314] SSH Resolver called for host: akane
[20:15:39.314] Setting up SSH remote "akane"
[20:15:39.342] Using commit id "622cb03f7e070a9670c94bae1a45d78d7181fbd4" and quality "stable" for server
[20:15:39.352] Install and start server if needed
[20:15:41.097] getPlatformForHost was canceled
[20:15:41.106] Resolver error: Error: Connecting was canceled
    at Function.Canceled (c:\Users\Por\.vscode\extensions\ms-vscode-remote.remote-ssh-0.64.0\out\extension.js:1:64325)
    at c:\Users\Por\.vscode\extensions\ms-vscode-remote.remote-ssh-0.64.0\out\extension.js:1:311251
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.t.withShowDetailsEvent (c:\Users\Por\.vscode\extensions\ms-vscode-remote.remote-ssh-0.64.0\out\extension.js:1:406337)
    at async Object.t.resolve (c:\Users\Por\.vscode\extensions\ms-vscode-remote.remote-ssh-0.64.0\out\extension.js:1:315001)
    at async c:\Users\Por\.vscode\extensions\ms-vscode-remote.remote-ssh-0.64.0\out\extension.js:127:110431
[20:15:41.116] ------

I set .pem file in -> C:\Users\Por\.ssh
then I run vscode in user directory -> C:\Users\Por\

[C:\Users\Por\\.ssh\config]

HostName is Public IPv4 address

    Host akane
      HostName 13.xxx.xxx.xxx
      User ec2-user
      IdentityFile ~/.ssh/akane.pem
      # UserKnownHostsFile /dev/null
[C:\Users\Por\AppData\Roaming\Code\User\settings.json]

    "remote.SSH.remotePlatform": {
        "$ec2-user": "linux"
    }
Por
  • 29
  • 5
  • In settings.json, the key should be the IP/hostname not the username, in your case `"13.xxx.xxx.xxx": "linux"`, but that doesn't solve your problem, it's only a hint – jeb Mar 01 '21 at 06:45
  • Thank your hint, as you said, it was not solved. I hear that IP should be used in this case from you... – Por Mar 01 '21 at 09:38
  • `getPlatformForHost was canceled` looks odd. Did you click somewhere while VSCode asks for the platform (visible at the top of the window)? – jeb Mar 01 '21 at 11:25
  • Thanks, jeb. I wait so long that if I click on any of the screens in the middle, it breaks. Sometimes I waited for about 30 minutes. – Por Mar 02 '21 at 05:04
  • I will try another PaaS once. I will close this question once. Can you tell me again? – Por Mar 02 '21 at 05:05
  • If it breaks in the moment you click anywhere, you should look at the top if there is the question about the remote machine os type and click there at `linux`. – jeb Mar 02 '21 at 06:59

0 Answers0