Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
Everything was working fine two hours ago. I quitted VS Code, it did an update, I opened it again and now I have this error.
As https://github.com/microsoft/vscode-remote-release/issues/2348, my SSH connection hangs on
Sending command: bash
I get the same issue when I copy/paste the command apparently used by VS Code Remote SSH:
ssh -T -D 56284 myremotehost bash
with additional option "-v" I can see the Sending command: bash hanging.
Adding -t after -T seems to solve it:
ssh -T -t -D 56284 myremotehost bash
I have this same behavior, SSHing into Ubuntu 18.04 machines. How do I configure the extra -t command line option for the Remote SSH extension to use?
I observe the same issue if I just run the same command on the command line.
Version 0.51.0 of Remote SSH plugin.
About window:
Version: 1.44.0 (user setup)
Commit: 2aae1f26c72891c399f860409176fe435a154b13
Date: 2020-04-07T23:31:18.860Z (2 days ago)
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362
edit: logs (with server name replaced with blah.net):
[14:46:13.642] Log Level: 2
[14:46:13.649] [email protected]
[14:46:13.649] win32 x64
[14:46:13.652] SSH Resolver called for "ssh-remote+blah.net", attempt 1
[14:46:13.653] SSH Resolver called for host: blah.net
[14:46:13.653] Setting up SSH remote "blah.net"
[14:46:13.682] Using commit id "2aae1f26c72891c399f860409176fe435a154b13" and quality "stable" for server
[14:46:13.684] Install and start server if needed
[14:46:13.693] Checking ssh with "ssh -V"
[14:46:13.794] > OpenSSH_7.1p1 Microsoft_Win32_port_with_VS Sep 17 2016, OpenSSL 1.0.2d 9 Jul 2015
[14:46:13.799] Running script with connection command: ssh -T -D 32187 blah.net bash
[14:46:13.804] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[14:46:14.239] >
the logs continue with more > characters for a while
Got the same issue, stopped working from one moment to the next. Tried setting RequestTTY force in the SSH config, which did not work (neither for connecting via the extension nor with the command via the terminal. Also tried apt-get update && apt-get upgrade on the server, but no change.
About window:
Version: 1.45.0-insider (user setup)
Commit: 2225d77536d12fea2eda04930f431a5eb0930bba
Date: 2020-04-09T09:22:11.706Z (18 hrs ago)
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041
Extension: 0.51.0 (but also tried with nightly, and with 0.50.1)
Server (running in a Virtualbox VM):
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
I have another installation of VSCode:
Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:38:38.248Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041
where connecting works without issue.
By the way, VS Code indicates a "SSH Connection time out" error.
My understanding is that "-T" prevents from getting a TTY, which is normal since VS Code will interact without a terminal. On the contrary "-t" asks the server for TTY.
Me adding "-t" AFTER "-T" acts as removing "-T" (ssh -T -t -D 56284 myremotehost bash is equivalent to ssh -D 56284 myremotehost bash).
So I'm not really sure that the fact that ssh -v -T -D 56284 myremotehost bash on my PowerShell is stuck at Sending command: bash is really indicative of anything.
But if the same thing happens when VS Code runs it, no wonder it times out.
Then my question is:
ssh -T -D 56284 myremotehost bash in fact open a bash even in PowerShell? What is the expected behaviour? (and then we can investigate purely on SSH, not VS Code)Ok I have checked and in fact when I write "lsssh -vT myremotehost bash) while it is written "Sending command: bash" I get a proper response (list of files in my home). My apologies, I'm not an advanced SSH user.
I guess the timeout issue is on VS Code side, neither my SSH nor the server.
Output of Remote SSH:
[12:07:55.938] Log Level: 2
[12:07:55.946] [email protected]
[12:07:55.946] win32 x64
[12:07:55.948] SSH Resolver called for "ssh-remote+poseideep", attempt 1
[12:07:55.949] SSH Resolver called for host: poseideep
[12:07:55.949] Setting up SSH remote "poseideep"
[12:07:55.973] Using commit id "c12bd56a8886f31e353a45f5846f0a35a52f908e" and quality "insider" for server
[12:07:55.974] Install and start server if needed
[12:07:58.620] Checking ssh with "ssh -V"
[12:07:58.688] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
[12:07:58.691] Running script with connection command: ssh -T -o ClearAllForwardings=true poseideep bash
[12:07:58.695] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:08:10.699] Resolver error: Connecting with SSH timed out
[12:08:10.702] ------
[12:08:11.224] > ]0;C:\WINDOWS\System32\cmd.exe
[12:08:11.225] Got some output, clearing connection timeout
[12:08:11.479] > 29cf71794806: running
[12:08:11.505] > Warning: Can't find libstdc++.so or ldconfig, can't verify libstdc++ version
> Acquiring lock on /home/arsleust/.vscode-server-insiders/bin/c12bd56a8886f31e353a45f5846f0a35a52f908e/vscode-remote-lock.arsleust.c12bd56a8886f31e353a45f5846f0a35a52f908e
> \ln /home/arsleust/.vscode-server-insiders/bin/c12bd56a8886f31e353a45f5846f0a35a52f908e/vscode-remote-lock.arsleust.c12bd56a8886f31e353a45f5846f0a35a52f908e.target /home/arsleust/.vscode-server-insiders/bin/c12bd56a8886f31e353a45f5846f0a35a52f908e/vscode-remote-lock.arsleust.c12bd56a8886f31e353a45f5846f0a35a52f908e
> Found existing installation at /home/arsleust/.vscode-server-insiders/bin/c12bd56a8886f31e353a45f5846f0a35a52f908e...
> SSH_CONNECTION=192.168.1.22 50484 192.168.1.40 22
> LANG=en_US.UTF-8
> EDITOR=nano
> MOZ_PLUGIN_PATH=/home/arsleust/.nix-profile/lib/mozilla/plugins:/etc/profiles/per-user/arsleust/lib/mozilla/plugins:/nix/var/nix/profiles/default/lib/mozilla/plugins:/run/current-system/sw/lib/mozilla/plugins
> KDEDIRS=/home/arsleust/.nix-profile:/etc/profiles/per-user/arsleust:/nix/var/nix/profiles/default:/run/current-system/sw
> NO_AT_BRIDGE=1
> QTWEBKIT_PLUGIN_PATH=/home/arsleust/.nix-profile/lib/mozilla/plugins/:/etc/profiles/per-user/arsleust/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/
> XDG_SESSION_ID=51
> USER=arsleust
> PAGER=less -R
> TZDIR=/etc/zoneinfo
> LIBEXEC_PATH=/home/arsleust/.nix-profile/lib/libexec:/etc/profiles/per-user/arsl
> eust/lib/libexec:/nix/var/nix/profiles/default/lib/libexec:/run/current-system/s
> w/lib/libexec
> NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/
[12:08:11.510] >
> per-user/arsleust /home/arsleust/.nix-profile
> NIX_PATH=/home/arsleust/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-
> user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/
> profiles/per-user/root/channels
> PWD=/home/arsleust
> SSH_ASKPASS=/nix/store/ha8b5ad1hzyxn121v97k7dfj0c24mq9l-x11-ssh-askpass-1.2.4.1/
> libexec/x11-ssh-askpass
> HOME=/home/arsleust
[12:08:11.516] >
> SSH_CLIENT=192.168.1.22 50484 22
> XDG_SESSION_TYPE=tty
> GTK_PATH=/home/arsleust/.nix-profile/lib/gtk-2.0:/home/arsleust/.nix-profile/lib
> /gtk-3.0:/etc/profiles/per-user/arsleust/lib/gtk-2.0:/etc/profiles/per-user/arsl
> eust/lib/gtk-3.0:/nix/var/nix/profiles/default/lib/gtk-2.0:/nix/var/nix/profiles
> /default/lib/gtk-3.0:/run/current-system/sw/lib/gtk-2.0:/run/current-system/sw/l
> ib/gtk-3.0
> XDG_DATA_DIRS=/home/arsleust/.nix-profile/share:/etc/profiles/per-user/arsleust/
> share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
> STRIGI_PLUGIN_PATH=/home/arsleust/.nix-profile/lib/strigi/:/etc/profiles/per-use
[12:08:11.524] >
> r/arsleust/lib/strigi/:/nix/var/nix/profiles/default/lib/strigi/:/run/current-sy
> stem/sw/lib/strigi/
> TERMINFO_DIRS=/home/arsleust/.nix-profile/share/terminfo:/etc/profiles/per-user/
> arsleust/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/run/curren
> t-system/sw/share/terminfo
> __NIXOS_SET_ENVIRONMENT_DONE=1
> QT_PLUGIN_PATH=/home/arsleust/.nix-profile/lib/qt4/plugins:/home/arsleust/.nix-p
> rofile/lib/kde4/plugins:/etc/profiles/per-user/arsleust/lib/qt4/plugins:/etc/pro
> files/per-user/arsleust/lib/kde4/plugins:/nix/var/nix/profiles/default/lib/qt4/p
> lugins:/nix/var/nix/profiles/default/lib/kde4/plugins:/run/current-system/sw/lib
[12:08:11.532] >
> /qt4/plugins:/run/current-system/sw/lib/kde4/plugins
> NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/arsleust
> SHELL=/run/current-system/sw/bin/bash
> TERM=dumb
> XDG_SESSION_CLASS=user
> SHLVL=2
> LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
> VSCODE_AGENT_FOLDER=/home/arsleust/.vscode-server-insiders
> LOGNAME=arsleust
> NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
> XDG_RUNTIME_DIR=/run/user/1000
[12:08:11.538] >
> XDG_CONFIG_DIRS=/etc/xdg:/home/arsleust/.nix-profile/etc/xdg:/etc/profiles/per-u
> ser/arsleust/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/s
> w/etc/xdg
> PATH=/run/wrappers/bin:/home/arsleust/.nix-profile/bin:/etc/profiles/per-user/ar
> sleust/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
> INFOPATH=/home/arsleust/.nix-profile/info:/home/arsleust/.nix-profile/share/info
> :/etc/profiles/per-user/arsleust/info:/etc/profiles/per-user/arsleust/share/info
> :/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/ru
> n/current-system/sw/info:/run/current-system/sw/share/info
> XCURSOR_PATH=/home/arsleust/.icons:/home/arsleust/.local/share/icons:/home/arsle
> ust/.nix-profile/share/icons:/home/arsleust/.nix-profile/share/pixmaps:/etc/prof
[12:08:11.543] >
> iles/per-user/arsleust/share/icons:/etc/profiles/per-user/arsleust/share/pixmaps
> :/nix/var/nix/profiles/default/share/icons:/nix/var/nix/profiles/default/share/p
> ixmaps:/run/current-system/sw/share/icons:/run/current-system/sw/share/pixmaps
> __ETC_PROFILE_DONE=1
> _=/run/current-system/sw/bin/printenv
[12:08:11.567] > XDG_SESSION_CLASS=user
> SHLVL=2
> LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
> VSCODE_AGENT_FOLDER=/home/arsleust/.vscode-server-insiders
> LOGNAME=arsleust
> NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
> XDG_RUNTIME_DIR=/run/user/1000
> XDG_CONFIG_DIRS=/etc/xdg:/home/arsleust/.nix-profile/etc/xdg:/etc/profiles/per-user/arsleust/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg
> PATH=/run/wrappers/bin:/home/arsleust/.nix-profile/bin:/etc/profiles/per-user/arsleust/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
> INFOPATH=/home/arsleust/.nix-profile/info:/home/arsleust/.nix-profile/share/info:/etc/profiles/per-user/arsleust/info:/etc/profiles/per-user/arsleust/share/info:/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/run/current-system/sw/info:/run/current-system/sw/share/info
> XCURSOR_PATH=/home/arsleust/.icons:/home/arsleust/.local/share/icons:/home/arsleust/.nix-profile/share/icons:/home/arsleust/.nix-profile/share/pixmaps:/etc/profiles/per-user/arsleust/share/icons:/etc/profiles/per-user/arsleust/share/pixmaps:/nix/var/nix/profiles/default/share/icons:/nix/var/nix/profiles/default/share/pixmaps:/run/current-system/sw/share/icons:/run/current-system/sw/share/pixmaps
> __ETC_PROFILE_DONE=1
> _=/run/current-system/sw/bin/printenv
> Starting server with command... /home/arsleust/.vscode-server-insiders/bin/c12bd56a8886f31e353a45f5846f0a35a52f908e/server.sh --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 &> "/home/arsleust/.vscode-server-insiders/.c12bd56a8886f31e353a45f5846f0a35a52f908e.log" < /dev/null
> Waiting for server log...
[12:08:12.009] >
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
[12:08:12.015] > 29cf71794806: start
> agentPort==33551==
> osReleaseId==nixos==
> arch==x86_64==
> webUiAccessToken====
> tmpDir==/run/user/1000==
> platform==linux==
> 29cf71794806: end
[12:08:12.022] >
[12:08:12.341] "install" terminal command done
[12:08:12.344] Install terminal quit with output:
I'm having the same problem. I'm trying to connect from a Mac to a Ubuntu 19 machine.
[09:10:24.146] "install" terminal received data: ""
[09:10:24.176] "install" terminal received data: "debug1: Authentication succeeded (password).
Authenticated to 192.168.1.125 ([192.168.1.125]:22).
debug1: Local connections to LOCALHOST:53781 forwarded to remote address socks:0
debug1: Local forwarding listening on ::1 port 53781.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 53781.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
"
[09:10:24.710] "install" terminal received data: "debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: bash
"
[09:11:19.534] "install" terminal command done
[09:11:19.534] "install" terminal received data: "packet_write_wait: Connection to 192.168.1.125 port 22: Broken pipe
"
[09:11:19.535] Install terminal quit with output: debug1: Sending command: bash
[09:11:19.535] Received install output: debug1: Sending command: bash
[09:11:19.536] Stopped parsing output early. Remaining text: debug1: Sending command: bash
[09:11:19.536] Failed to parse remote port from server output
[09:11:19.537] Resolver error:
[09:11:19.539] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"UnparsableOutput","askedPw":"0","askedPassphrase":"0","asked2fa":"0","askedHostKey":"0","gotUnrecognizedPrompt":"0","remoteInConfigFile":"1"},"measures":{"resolveAttempts":1,"retries":1}}
[09:11:19.541] ------
ps: reverting to previous version worked for me.
(switching from remote-ssh 0.51.0 to 0.50.1)
ps: reverting to previous version worked for me.
(switching from remote-ssh 0.51.0 to 0.50.1)
Same
I got the same problem, but it works when I am in office without VPN connection.
I have this issue while connecting with VPN.
vscode version
Version: 1.44.1
Commit: a9f8623ec050e5f0b44cc8ce8204a1455884749f
Date: 2020-04-13T14:40:29.529Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-22-generic snap
me too. I can use it while in office without VPN!
The main point is using it remotely with VPN!
I was not using a VPN when the issue occured for me.
Sorry for the slow response. Still an issue in the latest remote-ssh version?
The issue does not happen anymore for me; thanks for the follow up 馃憤
Most helpful comment
ps: reverting to previous version worked for me.
(switching from remote-ssh 0.51.0 to 0.50.1)