4

My workflow is: I ssh into machine A from my local, then into machine B from machine A. I wish to develop on machine B using VScode remote functionality but this two-level ssh doesn't look straight forward in VScode and a google search didn't yield much info on it either.

Is there a way to do this?

Thanks!

1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Nov 8, 2021 at 13:37

1 Answer 1

4

The key word is ProxyJump here.

ssh hostb -o ProxyJump=hosta

For using it with vscode, you should edit your .ssh/config

HOST my_alias_name_for_host_a
  hostname ip_or_hostname
  user my_username_on_host_a

HOST my_alias_name_for_host_b
  hostname ip_or_hostname
  user my_username_on_host_b
  ProxyJump my_alias_name_for_host_a

vscode will work without even knowing that there is an intermediate host

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.