0

Cannot connect remotely using VS Code via SSH in Linux Mint. Connecting to the remote server via SSH using Terminal works.

I am using Remote-SSH extension.

At first I tried to connect the same way as in terminal providing the host and password.

That didn't work in VS Code, the green status box on bottom left would spin with "Opening Remote..." message while the left pane displayed "Connected to remote" with blue button "Open Folder", which would not do anything. The only way to get out of the infinite "Opening Remote..." mode would be to "Close remote connection" when clicking the green status box.

Then followed this article How Using VSCode SSH Key to connect to remote Linux host ?

...and it didn't fix it either resulting in the same blue button in the left pane and asking for a password in infinite loop. Only closing remote connection would stop this.

This is partial Output - perhaps something wrong with remote port (?):

[09:22:35.430] Remote server is listening on 42781
[09:22:35.430] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":42781},"osReleaseId":"debian","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/tmp","platform":"linux","connectionToken":"a1111111-a1a1-11a1-11a1-a1111111a111"},"installUnpackCode":""}
[09:22:35.430] Persisting server connection details to /home/****/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-f6ca3375-5e805b79fcb6ba4c2d23712967df89a089da575b-0.98.0/data.json
[09:22:35.432] Starting forwarding server. localPort 43149 -> socksPort 39755 -> remotePort 42781
[09:22:35.432] Forwarding server listening on 43149
[09:22:35.432] Waiting for ssh tunnel to be ready
[09:22:35.433] [Forwarding server 43149] Got connection 0
[09:22:35.433] Tunneled 42781 to local port 43149
[09:22:35.433] Resolved "ssh-remote+7b22686f73744e616d65223a2252656d6f7465436f6e6e227d" to "127.0.0.1:43149"
[09:22:35.440] ------

[09:22:35.459] [Forwarding server 43149] Got connection 1
[09:22:35.522] Failed to set up socket for dynamic port forward to remote port 42781: Socket closed. Is the remote port correct?
[09:22:35.544] Failed to set up socket for dynamic port forward to remote port 42781: Socket closed. Is the remote port correct?
prager
  • 1
  • 1

0 Answers0