I have a gpu-server Server-A in office. The only way to access that server is through the office wired network. The office provides a proxy server Server-B. How I connect to the Server-B? I first ssh login Server-B, then in the bash of Server-B, ssh login Server-A. I want to use vscode remote extension to work for Server-A. How can I do? I can connect to Server-B now in vscode.
After several days of struggling, I have figured it out. As Marc said, vscode respects the tunnels I setup in my .ssh/config file. A sample can be like this:
Host serverA
HostName serverA_ip
PreferredAuthentications publickey
IdentityFile your_key
User you
Host serverB
Hostname serverB_ip
IdentityFile your_key
ProxyJump serverA
User you
Have you looked into setting up a tunnel in your ssh config to go to Server-A via Server-B?I believe vscode will respect the tunnels you setup in your .ssh/config file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With