Open jasperhyp opened 2 years ago
Hm and when you connect to this same host through PowerShell do you see your command in RemoteCommand being passed as expected?
Hm and when you connect to this same host through PowerShell do you see your command in RemoteCommand being passed as expected?
Yes, when I use PowerShell with ssh host.name.in.the.ssh.config
, this RemoteCommand
is passed, as shown in the snapshot below.
Never mind the error message. It just showed the remote command has been passed.
Well... maybe this error message is a problem even if the RemoteCommand
can be passed in VSCode-Remote, since I am also getting into this error using ssh something 'srun something'
command in MobaXterm (but np if I run srun something
after ssh something
to the login node).
However, it stays true that RemoteCommand
(even as simple as ls
) is not passed in VSCode, while both PowerShell and Moba pass it:
Oh I missed this earlier. I see in your logs you have [11:47:37.915] "remote.SSH.useLocalServer": false
You need to have useLocalServer
enabled to use RemoteCommand. That's why you see in the connection command RemoteCommand=none
Oh I missed this earlier. I see in your logs you have
[11:47:37.915] "remote.SSH.useLocalServer": false
You need to have
useLocalServer
enabled to use RemoteCommand. That's why you see in the connection commandRemoteCommand=none
Oh looks like this parameter is set to false
in ssh. But I did set the parameter to true
in settings.json
, and the box before Remote.SSH: Use Local Server
is shown to be marked:
"remote.SSH.useLocalServer": true,
"remote.SSH.enableRemoteCommand": true,
"terminal.integrated.inheritEnv": false,
"remote.SSH.remoteServerListenOnSocket": true,
"window.zoomLevel": 1,
Try setting "remote.SSH.remoteServerListenOnSocket" to false.
They can't work in conjunction.
- Failed to set up socket for dynamic port forward to remote port 45824: Socket closed
Thank you, I actually tried set "remote.SSH.remoteServerListenOnSocket": false
and "remote.SSH.useLocalServer": true
at the time I filed this issue, but it yielded an error Failed to set up socket for dynamic port forward to remote port XXXX: Socket closed
. It's still the case now.
Oh I see, hm that's unfortunate. Right now we can only support RemoteCommand when local server is enabled but for some machines that method doesn't work and remoteServerListenOnSocket
is needed like your machine seems to. I'm not sure if there's a resolution for this.
Oh I see, hm that's unfortunate. Right now we can only support RemoteCommand when local server is enabled but for some machines that method doesn't work and
remoteServerListenOnSocket
is needed like your machine seems to. I'm not sure if there's a resolution for this.
Got it, thanks! I tried again today and it just doesn't work. Maybe I'll just use VS Code to view the code but not run anything.
Sorry about that! Do you need RemoteCommand to run/compile your code?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
Sorry about that! Do you need RemoteCommand to run/compile your code?
Thanks for the follow-up. Have been out of work for a few days. I am mainly using Python so usually compilation is not needed. I just sometimes want to use .ipynb
files to test some code. My current workflow is to use VS Code's Remote SSH for viewing & editing (because I love your great add-ons), and use Jupyter notebook & port-forwarding to test small code. That works despite a bit more windows.
use Jupyter notebook & port-forwarding to test small code
Is this done locally on your machine or on a remote machine? I believe everything you do locally should be able to be done in your remote if you wish it have it running there. Maybe just not as a RemoteCommand that runs on connection to the remote.
use Jupyter notebook & port-forwarding to test small code
Is this done locally on your machine or on a remote machine? I believe everything you do locally should be able to be done in your remote if you wish it have it running there. Maybe just not as a RemoteCommand that runs on connection to the remote.
I meant to say "open Jupyter Notebook on the remote machine and port forward to local machine with browser". I cannot do this with Remote SSH because I need to run RemoteCommand
to get to the second (computing) layer of the HPC to run .ipynb
files (since they are too resource-intensive for a login layer).
Ahh I see. Thanks for explaining! Sorry about that! I'll explore alternatives to localServer with remoteListenOnSocket is needed.
I face the same issue. I need to use slurm for ressource allocation because the login nodes are slow (they are login nodes after all) and cannot handle vscode server properly (ie most features are significanly slowed-down).
Standard ssh with port forwarding directly to the compute node doesn't works (ssh -L) but I can reverse forward from the compute to the login node (e.g. I can forward tensorboard running on the compute node)
my .ssh/config
content (I need to use a jump node to get access to the login node)
Host zzz_vscode
HostName zzz
User yyy
ProxyCommand XXX
RequestTTY yes
RemoteCommand srun -N1 --account=xxx --cpus-per-task=1 --pty bash
Ahh I see. Thanks for explaining! Sorry about that! I'll explore alternatives to localServer with remoteListenOnSocket is needed.
@tanhakabir did you had a chance to look at it and pinpoint the issue?
would be really cool to just be able to use:
RemoteCommand srun --pty --gres=gpu:1 /bin/bash
and let vscode figure out which ports to forward/listen to, automatically.
Greeting! I just found this Issue while I tried to achieve something similar (Running VSCode on a Slurm Node with singularity, Using RemoteCommand and LocalServer) and I am facing the exact same issue as @ilyasdc. The output of the install procedure looks almost identical, with the final error
Failed to set up socket for dynamic port forward to remote port
Can I somehow help with this Issue, maybe by providing Logfiles or similar? This feature would greatly benefit the research at my facility, so I would be very glad to help.
- Failed to set up socket for dynamic port forward to remote port 45824: Socket closed
Thank you, I actually tried set
"remote.SSH.remoteServerListenOnSocket": false
and"remote.SSH.useLocalServer": true
at the time I filed this issue, but it yielded an errorFailed to set up socket for dynamic port forward to remote port XXXX: Socket closed
. It's still the case now.
I'm seeing similar forwarding errors when using the RemoteCommand when trying to run the allocation through the command. So, same behavior as the one reported by @jasperhyp and @ilyasdc .
I can, however, execute commands directly on the login node.
It seems that something with the jump on the resource allocation (srun
or salloc
) messes up the setup from VSCode.
Happy to debug in case you need some logs.
Workaround from a very clever friend (credits to Gwen, whose GitHub id I don't know about):
For those who only need to srun
to the compute node, try first srun a compute node in server using anything else and then use ProxyJump
command in config.ssh
, e.g.
Host login-node
HostName login-node.edu
User hello
Host compute-node
HostName %h
ProxyJump login-node
User hello
The assumption here is that you can use ssh compute-node
in your server once you log onto the login node. Works for my case.
Also see here
Workaround from a very clever friend (credits to Gwen, whose GitHub id I don't know about):
For those who only need to
srun
to the compute node, try first srun a compute node in server using anything else and then useProxyJump
command inconfig.ssh
, e.g.Host login-node HostName login-node.edu User hello Host compute-node HostName %h ProxyJump login-node User hello
The assumption here is that you can use
ssh compute-node
in your server once you log onto the login node. Works for my case.Also see here
If only it was as imple as that ... I cannot directly ssh to the compute node !
I'm also facing the same usecase as @ilyasdc, but using a TORQUE instead of SLURM. Of course, the workaround proposed by @jasperhyp does not really work on batch systems as SSHing into compute nodes is forbidden. To me, it seems that the extension is ignoring the RequestTTY yes
because in a normal terminal it works just fine.
My config is:
Host login-interactive
HostName ssh.login-node.edu
User myuser
RemoteCommand qsub -I -W group_list=GROUP -A GROUP -l nodes=1:ppn=1,mem=1g,walltime=01:00:00
RequestTTY force
Excerpt of output:
Authenticated to ssh.login-node.edu ([IP]:22).
qsub: standard input and output must be a terminal for
interactive job submission
hi everyone :) any news on this issue? would be really helpful to have RemoteCommand+Slurm working together...
My team and I are also desperately waiting for a solution to this. Any updates on the progress? Thanks!
Bumping this up
Hello! Could the people still interest in the thread outline their exact use case for this need. This would be a complicated fix so we are trying to determine if there are any solutions this problem that might be more successful and quicker. Thanks!
Hi @eleanorjboyd ,
the original post describes it best (first post in this issue) https://github.com/microsoft/vscode-remote-release/issues/6086#issue-1085195764
The overall goal is to run the vscode-server on a compute node, e.g. in a computer cluster.
Specifically, with RemoteCommand
in the ssh config file we try to allocate a resource (via slurm or any other job scheduler) and let vscode-server run on the allocated node:
RemoteCommand srun --mem=16G -c=1 --time=08:00:00 --pty bash
This is crucial because in many compute clusters it is not allowed to run something like vscode-server on the head node itself.
So RemoteCommand
would solve this as it does run the slurm command first and then starts the vscode-server on the allocated resource. However, RemoteCommand does not exactly behave like it is supposed to. This issue #6086 narrows it down to the settings ("remoteServerListenOnSocket", "useLocalServer", etc.) that may interfere with RemoteCommand. Also, this issue is related to this issue #1722
hope it helps. Looking forward to having RemoteCommand properly working in combination with a compute cluster.
Hi @eleanorjboyd , I believe there still should be interest.
The proposed solution is to run code-server on a remote machine we need to connect. In our case, it means scheduling a job via cluster management software (e.g. slurm) to run code-server binary on a computational node, and then get the stdout from code-server with connection details (pin code). Then use VSCode "Remote - Tunnels" plugin to connect to that code-server instance.
Downside of the proposed solution is: It uses Microsoft infrastructure to tunnel the traffic between Remote Tunnel plugin and code-server instance. If everything is in the same local net, this shouldn't be needed.
With "Remote - SSH" plugin the issue is the following. It allows to customize RemoteCommand, and we can use a customized RemoteCommand to run 'Code' on a computational node (instead of the node we established ssh connection to) and also to set up our own transparent tunneling between the computational node and the slurm control node, so that the 'Code' running on a computational node could be contacted via socket on a control node. However, we don't have a way for the Visual Studio Code (which is being run on a local PC) to use that particular socket instead of the one it thinks it have to use.
Hope I described the use case. If it's still not very clear, feel free to engage someone technical from your company (I'm sorry if it sounds rude, I just don't want this comment to be sort of useless or lost, and don't know how to express it better in words).
Thanks for the explanations but I still don't fully understand the situation.
It sounds like this is issue essentially about using remoteServerListenOnSocket
while also using useLocalServer
so that RemoteCommand will work. That's probably just not going to work, due to the constraints on how things work that come from ssh. In that case, I wonder whether dropping remoteServerListenOnSocket
is a solution for you. If there's a concern about security in having the server listen to a port, we have protections around access to the server's port that prevent other users from connecting to it.
Besides that, it sounds like what @ekungurov is saying is that using RemoteCommand for the slurm setup is not sufficient, and I think #1722 essentially covers that issue. I don't really understand it though-
can use a customized RemoteCommand to run 'Code' on a computational node (instead of the node we established ssh connection to) and also to set up our own transparent tunneling between the computational node and the slurm control node, so that the 'Code' running on a computational node could be contacted via socket on a control node. However, we don't have a way for the Visual Studio Code (which is being run on a local PC) to use that particular socket instead of the one it thinks it have to use.
With the RemoteCommand, wouldn't that mean that Remote-SSH connects and runs its setup script in the context of the compute node, and forwards our server's port/socket from the compute node to the local machine? Why do you say you have to set up your own forwarding from the login node?
@roblourens on HPC users usually don't ssh directly to a compute node to launch a task. Instead, they ssh to a control node (login node) and then submit tasks to the cluster. Cluster mgmt software automatically choose a compute node (worker node) from the pool of compute nodes which currently have requested resources available.
That's why in #1722 a solution from @samfux84 (edited: this one https://github.com/microsoft/vscode-remote-release/issues/1722#issuecomment-837902373) use ssh -L for tunneling, and solution from @simonbyrne (this one https://github.com/microsoft/vscode-remote-release/issues/1722#issuecomment-1184705403) uses nc I believe for the same purpose.
on HPC users usually don't ssh directly to a compute node to launch a task. Instead, they ssh to a control node (login node) and then submit tasks to the cluster. Cluster mgmt software automatically choose a compute node (worker node) from the pool of compute nodes which currently have requested resources available.
I understand that. But I guess that even if our setup script runs in the compute node context, ssh still connected to the login node and so the forwarding that ssh sets up only goes as far as the login node, that makes sense.
It sounds like this is issue essentially about using remoteServerListenOnSocket while also using useLocalServer so that RemoteCommand will work. That's probably just not going to work, due to the constraints on how things work that come from ssh. In that case, I wonder whether dropping remoteServerListenOnSocket is a solution for you. If there's a concern about security in having the server listen to a port, we have protections around access to the server's port that prevent other users from connecting to it.
@roblourens Please see my discussion with @tanhakabir at the beginning of this post. Specifically this one. I tried combinations of true/false for those settings but there seems not one combination that would allow RemoteCommand
to work.
@roblourens
if our setup script runs in the compute node context, ssh still connected to the login node
Yes, correct.
so the forwarding that ssh sets up only goes as far as the login node
samfux84 solution is almost completely semi-manual/manual, and it establish ssh tunnel between "localhost" and the compute node (where https://github.com/coder/code-server aka "VS Code in the browser" is being run). It is supposed that end user will download / copy the generated bash script, and run it on his own local Linux/MacOS/WSL workstation, so the "localhost" is a workstation in this case.
simonbyrne solution, on the other hand, runs yet another copy of sshd as a task (as a user process) on a compute node, and then 'nc' the traffic to that instance of sshd.
My question... I mean, I probably have a question... Is it possible to apply custom RemoteCommand to login node, but once it applied - to connect to a compute node : either directly to the compute node and probably manually (directly - without using ssh/nc tunneling and without entering XXXX-XXXX pin code on https://github.com/login/device thus utilizing some MS Azure tunneling technology), OR if that's not possible, maybe via ssh/nc tunneling but that tunneling being set up automatically (via custom RemoteCommand or other means).
Please see my discussion with @tanhakabir at the beginning of this post. Specifically https://github.com/microsoft/vscode-remote-release/issues/6086#issuecomment-1007875147. I tried combinations of true/false for those settings but there seems not one combination that would allow RemoteCommand to work.
Thanks- that configuration should work, since those are the defaults for those settings (on mac/linux, and should generally work on windows). If you are still seeing that, I can help troubleshoot if you share the full log from the Remote-SSH output channel. However one possible explanation for that error message is that TCP port forwarding is disabled on your ssh server, if that's the case, you might need to talk to your system administrator, or, you might be stuck with a socket.
My question...
Great question! I really don't know 😁. I suspect that the answer is no, and that the only solution is for a complex custom workaround of the sort that has been mentioned already.
that configuration should work, since those are the defaults for those settings (on mac/linux, and should generally work on windows)
Thanks, could you specify which settings?
"remote.SSH.remoteServerListenOnSocket": false
and "remote.SSH.useLocalServer": true
samfux84 solution is almost completely semi-manual/manual, and it establish ssh tunnel between "localhost" and the compute node (where https://github.com/coder/code-server aka "VS Code in the browser" is being run). It is supposed that end user will download / copy the generated bash script, and run it on his own local Linux/MacOS/WSL workstation, so the "localhost" is a workstation in this case.
Hi @ekungurov,
I scripted our solution that we are using for the users of our HPC cluster, so for the end user it is fully automated (including the setup of the SSH tunnel and opening the local browser with the URL from the code-server):
https://gitlab.ethz.ch/sfux/VSCode_remote_HPC
The only prerequisite for the end user is to have SSH keys for password-less access to the cluster (as all commands are run through ssh, because the script runs on the local computer of the user).
The users can download our script and run it on their local computer specifying what resources they want for the batch job and then wait until it has started.
For instance, if I run the command
./start_vscode.sh -u sfux -b SLURM -n 4 -W 04:00 -m 2048
on my local computer, then it will login to the cluster as user sfux, submit a batch job via Slurm, requesting 4 cores, 4 hours of runtime and 2 GB of memory per core, setup the required SSH tunnel and start the local browser with the URL provided by the code-server. We tested the script with Linux, macOS and Windows (using git-bash) and it works.
We plan to replace code-server in the future with vscode-server once there is a public release.
This kind of setup can also be used for other use-cases like jupyter scripts (in case there is no jupyter hub available):
https://gitlab.ethz.ch/sfux/Jupyter-on-Euler-or-Leonhard-Open
"remote.SSH.remoteServerListenOnSocket": false
and"remote.SSH.useLocalServer": true
It seems not working though. I can connect to the login node but no compute node is requested, meaning that the command is not run. My setting.json
looks like:
"remote.SSH.enableRemoteCommand": true,
"terminal.integrated.inheritEnv": false,
"cmake.configureOnOpen": false,
"remote.SSH.remoteServerListenOnSocket": false, // changed
"remote.SSH.useLocalServer": true,
I used a very simple setup in my config:
Host some_name
HostName some_host
User some_user
RemoteCommand some_srun_command
Silly question: How to get logs when logging with remote-ssh? It looks like it's now not creating logs by default if the connection is successful.
View > Output > Remote-SSH in the dropdown
I'd rather discuss the general "how to connect to slurm" issues in #1722 since it seems that's what that issue is generally about. This one can be "using remoteListenOnSocket with useLocalServer", but I'm not sure we'll be able to do anything about that.
I also noticed the error "Cannot use RemoteCommand if you have this remote in your "remote.SSH.remotePlatform" setting", so I followed the solution here to change the RequestTTY
and IdentityFile
, comment out remote.SSH.remotePlatform
, and set remoteListenOnSocket and useLocalServer as you recommended. It then looked like RemoteCommand worked. However, I was not able to connect to the server if using RemoteCommand. It was only when I commented that line in config that I could connect to the server.
Config:
Host test
HostName some_server
User yeh803
IdentityFile C:/Users/xxx/.ssh/id_rsa
RequestTTY yes # I also tried commenting this but no difference
RemoteCommand ls -l
Error log below:
RemoteCommand
has to be something that won't terminate, like ls -l; bash
Doesn't work, same error log.
As of June 21, creating a direct connection to a Slurm job is still faulty.
Version: 1.80.0-insider
Commit: 79c4092768e41b16fd823e80c874dbfafdc08f55
Date: 2023-06-13T05:22:36.374Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.19.0-45-generic
This would be AWESOME.
Followed up all comments in 2024! And agree for your point @roblourens
This one can be "using remoteListenOnSocket with useLocalServer", but I'm not sure we'll be able to do anything about that.
I think main issue we discuss here is that,
bash
with RemoteCommand
(ex: RemoteCommand some_srun_command
) and it spawns bash in yet another host. remoteListenOnSocket
could be solution
RemoteCommand=true useLocalServer=true remoteListenOnSocket=true
Q1. Do you think above setting is completely unavailable by design?
Q2. Is there yet another solution to let vscode communicate properly when RemoteCommand
actually start bash in other host?
IMHO if there is no good way for both question we'd better close this ticket and keep discussing in main issue for HPC usage demands https://github.com/microsoft/vscode-remote-release/issues/1722
I was trying to get onto the second layer of an HPC after SSH-ing with some Slurm command (srun), as was generally described in #1722. I tried the newest
RemoteCommand
from the Pre-release version of Remote SSH (following instructions in this issue), but it seems not passing theRemoteCommand
when connecting.Logs
``` [11:47:37.895] Log Level: 2 [11:47:37.897] remote-ssh@0.71.2021121615 [11:47:37.897] win32 x64 [11:47:37.915] SSH Resolver called for "ssh-remote+some.host.name", attempt 1 [11:47:37.915] "remote.SSH.useLocalServer": false [11:47:37.916] "remote.SSH.showLoginTerminal": false [11:47:37.916] "remote.SSH.remotePlatform": {"instance-1":"linux","some.host.name":"linux"} [11:47:37.916] "remote.SSH.path": undefined [11:47:37.916] "remote.SSH.configFile": undefined [11:47:37.916] "remote.SSH.useFlock": true [11:47:37.916] "remote.SSH.lockfilesInTmp": false [11:47:37.916] "remote.SSH.localServerDownload": auto [11:47:37.916] "remote.SSH.remoteServerListenOnSocket": true [11:47:37.917] "remote.SSH.showLoginTerminal": false [11:47:37.917] "remote.SSH.defaultExtensions": [] [11:47:37.917] "remote.SSH.loglevel": 2 [11:47:37.917] "remote.SSH.enableDynamicForwarding": true [11:47:37.917] "remote.SSH.enableRemoteCommand": true [11:47:37.917] "remote.SSH.serverPickPortsFromRange": {} [11:47:37.917] "remote.SSH.serverInstallPath": {} [11:47:37.918] SSH Resolver called for host: some.host.name [11:47:37.918] Setting up SSH remote "some.host.name" [11:47:37.922] Using commit id "899d46d82c4c95423fb7e10e68eba52050e30ba3" and quality "stable" for server [11:47:37.925] Install and start server if needed [11:47:37.927] Checking ssh with "ssh -V" [11:47:37.961] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 (HERE) [11:47:37.964] Running script with connection command: ssh -T -D 8501 -o RemoteCommand=none "some.host.name" bash [11:47:37.966] Terminal shell path: C:\Windows\System32\cmd.exe [11:47:38.158] > ]0;C:\Windows\System32\cmd.exe [11:47:38.158] Got some output, clearing connection timeout [11:47:38.409] > P [11:47:38.446] > Password: [11:47:38.447] Showing password prompt [11:47:43.428] Got password response [11:47:43.429] "install" wrote data to terminal: "*******************" [11:47:43.446] > [11:47:58.917] > 91a30fe8ff8e: running [11:47:59.003] > Acquiring lock on /home/yeh803/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba5 > 2050e30ba3/vscode-remote-lock.yeh803.899d46d82c4c95423fb7e10e68eba52050e30ba3 [11:47:59.041] > Found existing installation at /home/yeh803/.vscode-server/bin/899d46d82c4c95423 > fb7e10e68eba52050e30ba3... [11:47:59.075] > Checking /home/yeh803/.vscode-server/.899d46d82c4c95423fb7e10e68eba52050e30ba3.l > og and /home/yeh803/.vscode-server/.899d46d82c4c95423fb7e10e68eba52050e30ba3.pid > for a running server [11:47:59.084] > Looking for server with pid: 31076 [11:47:59.173] > Starting server with command... /home/yeh803/.vscode-server/bin/899d46d82c4c9542 > 3fb7e10e68eba52050e30ba3/server.sh --start-server --host=127.0.0.1 --enable-remo > te-auto-shutdown --socket-path=/run/user/184812/vscode-ssh-remote-server-sock- > 1640018879 &> "/home/yeh803/.vscode-server/.899d46d82c4c95423fb7e10e68eba52050e > 30ba3.log" < /dev/null > printenv: > MANPATH=/n/app/lmod/lmod/share/man:: > XDG_SESSION_ID=20830 > rvm_bin_path=/usr/local/rvm/bin > GEM_HOME=/usr/local/rvm/gems/ruby-2.4.9 > SHELL=/bin/bash > IRBRC=/usr/local/rvm/rubies/ruby-2.4.9/.irbrc > MODULEPATH_ROOT=/n/app/lmod/lmod/modulefiles > SSH_CLIENT=73.61.9.36 9459 22 > CONDA_SHLVL=1 > CONDA_PROMPT_MODIFIER=(base) > LMOD_PKG=/n/app/lmod/lmod [11:47:59.181] > > MY_RUBY_HOME=/usr/local/rvm/rubies/ruby-2.4.9 > LMOD_VERSION=7.5.17 > QT_GRAPHICSSYSTEM_CHECKED=1 > USER=yeh803 > LMOD_sys=Linux > CONDA_EXE=/n/app/conda2/bin/conda > rvm_path=/usr/local/rvm > VSCODE_AGENT_FOLDER=/home/yeh803/.vscode-server > _CE_CONDA= > rvm_prefix=/usr/local > MAIL=/var/mail/yeh803 > PATH=/n/app/conda2/bin:/n/app/conda2/condabin:/usr/local/rvm/gems/ruby-2.4.9 > /bin:/usr/local/rvm/gems/ruby-2.4.9@global/bin:/usr/local/rvm/rubies/ruby-2.4.9/ > bin:/n/cluster/bin:/opt/singularity/bin:/usr/local/bin:/usr/bin:/opt/puppetlabs/ > bin:/usr/local/rvm/bin > SLURM_CONF=/etc/slurm/slurm.conf > CONDA_PREFIX=/n/app/conda2 > LMOD_SETTARG_CMD=: > PWD=/home/yeh803 > LANG=en_US.UTF-8 > MODULEPATH=/n/app/lmod/lmod/modulefiles/Linux:/n/app/lmod/lmod/modulefiles/C > ore > TZ=America/New_York > LMOD_CMD=/n/app/lmod/lmod/libexec/lmod > _CE_M= > HMS_CLUSTER=o2 > KRB5CCNAME=FILE:/tmp/krb5cc_184812_zPUZlA > rvm_version=1.29.10 (latest) > SHLVL=3 > HOME=/home/yeh803 > BASH_ENV=/n/app/lmod/lmod/init/bash > SSH_ORIGINAL_COMMAND=bash > CONDA_PYTHON_EXE=/n/app/conda2/bin/python > LOGNAME=yeh803 > GEM_PATH=/usr/local/rvm/gems/ruby-2.4.9:/usr/local/rvm/gems/ruby-2.4.9@globa > l > SSH_CONNECTION=73.61.9.36 9459 134.174.159.26 22 > MODULESHOME=/n/app/lmod/lmod > CONDA_DEFAULT_ENV=base > LESSOPEN=||/usr/bin/lesspipe.sh %s > SHARED_DATABASES=/n/groups/shared_databases > LMOD_FULL_SETTARG_SUPPORT=no > XDG_RUNTIME_DIR=/run/user/184812 > LMOD_DIR=/n/app/lmod/lmod/libexec > RUBY_VERSION=ruby-2.4.9 > BASH_FUNC_module()=() { eval $($LMOD_CMD bash "$@") && eval $(${LMOD_SETTAR > G_CMD:-:} -s sh) > } > BASH_FUNC_ml()=() { eval $($LMOD_DIR/ml_cmd "$@") > } > _=/usr/bin/printenv [11:47:59.188] > [11:47:59.207] > Spawned remote server: 104641 > Waiting for server log... [11:47:59.223] > [11:47:59.274] > Waiting for server log... [11:47:59.374] > Waiting for server log... [11:47:59.471] > Waiting for server log... [11:47:59.571] > Waiting for server log... [11:47:59.673] > Waiting for server log... [11:47:59.773] > Waiting for server log... [11:47:59.874] > Waiting for server log... [11:47:59.972] > Waiting for server log... [11:48:00.070] > Waiting for server log... [11:48:00.172] > Waiting for server log... [11:48:00.273] > Waiting for server log... [11:48:00.373] > Waiting for server log... [11:48:00.474] > Waiting for server log... [11:48:00.575] > Waiting for server log... [11:48:00.673] > Waiting for server log... [11:48:00.709] > Waiting for server log... [11:48:00.771] > Waiting for server log... [11:48:00.881] > > * > * Reminder: You may only use this software with Visual Studio family products, > * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) > * > [11:48:00.906] > [11:48:00.974] > 91a30fe8ff8e: start > SSH_AUTH_SOCK==== > DISPLAY==== > webUiAccessToken==== > listeningOn==/run/user/184812/vscode-ssh-remote-server-sock-1640018879== > osReleaseId==centos== > arch==x86_64== > tmpDir==/run/user/184812== > platform==linux== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > extInstallTime==== > serverStartTime==1695== > connectionToken==aa11111a-1aa1-111a-a111-11111a111a1a== > 91a30fe8ff8e: end [11:48:00.976] Received install output: SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==/run/user/184812/vscode-ssh-remote-server-sock-1640018879== osReleaseId==centos== arch==x86_64== tmpDir==/run/user/184812== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== extInstallTime==== serverStartTime==1695== connectionToken==aa11111a-1aa1-111a-a111-11111a111a1a== [11:48:00.977] Remote server is listening on /run/user/184812/vscode-ssh-remote-server-sock-1640018879 [11:48:00.977] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"socketPath":"/run/user/184812/vscode-ssh-remote-server-sock-1640018879"},"osReleaseId":"centos","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/184812","platform":"linux","connectionToken":"aa11111a-1aa1-111a-a111-11111a111a1a"},"serverStartTime":1695,"installUnpackCode":""} (HERE) [11:48:00.979] Running script with connection command: ssh -T -L 127.0.0.1:8507:/run/user/184812/vscode-ssh-remote-server-sock-1640018879 -o RemoteCommand=none "some.host.name" bash [11:48:00.980] Spawning tunnel with: type "C:\Users\Yep\AppData\Local\Temp\vscode-linux-multi-line-command-some.host.name-223392234.sh" | ssh -T -L 127.0.0.1:8507:/run/user/184812/vscode-ssh-remote-server-sock-1640018879 -o RemoteCommand=none "some.host.name" bash [11:48:00.981] Terminal shell path: C:\Windows\System32\cmd.exe [11:48:00.995] > [11:48:01.171] > ]0;C:\Windows\System32\cmd.exe [11:48:01.538] > P [11:48:01.822] > Password: [11:48:01.823] Showing password prompt [11:48:06.095] Got password response [11:48:06.095] "SSH Tunnel" wrote data to terminal: "*******************" [11:48:06.127] > [11:48:14.043] > SSH_AUTH_SOCK= > Connected to SSH Host - Please do not close this terminal [11:48:14.044] Spawned SSH tunnel between local port 8507 and remote target /run/user/184812/vscode-ssh-remote-server-sock-1640018879 [11:48:14.044] Waiting for ssh tunnel to be ready [11:48:14.045] Tunneled /run/user/184812/vscode-ssh-remote-server-sock-1640018879 to local port 8507 [11:48:14.045] Resolved "ssh-remote+some.host.name" to "127.0.0.1:8507" [11:48:14.048] ------ ```Steps to Reproduce:
Add
"remote.SSH.enableRemoteCommand": true, "remote.SSH.useLocalServer": true, "remote.SSH.remoteServerListenOnSocket": true
tosettings.json
."remote.SSH.remoteServerListenOnSocket": true
is a must because otherwise would result inFailed to set up socket for dynamic port forward to remote port 45824: Socket closed
.SSH to
some.host.name
with the following ssh config:Does this issue occur when you try this locally?: It's a connection issue.