I want to use VSCode from Windows but I need to open a folder in a remote Linux. I can use Remote - SSH with no problems for that, but now I need to do another "jump" from the remote Linux to another remote.
But the problem is that the 2nd remote is not reached via "ssh" from inside the 1st remote (if that was the case I would use the jump server function of vscode remote ssh).
To reach that 2nd remote, I need to run 2 commands in the 1st remote:
setenv EX_VAR something
mlogin -2ndremote
With those 2 commands I go to another "machine" in a grid and there are folders that I need to open.
If I do this in a Windows Powershell terminal, it works:
ssh -t user@1stremote "setenv EX_VAR something; mlogin -2ndremote"
But I can't run a vscode GUI from that point. I tried to edit the SSH configuration file in VSCode to include "RemoteCommand" and put those 2 commands, but it doesn't work.
I also tried to put that entire line that it works on windows terminal on the dialog box that show up in VSCode when you do "Add New SSH Host" but it also doesn't work. It always just connects to the first remote and it stays there, the commands are not executed.
Thanks!