.ssh/config

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Jan 18 8:18
Editor
Edited
Edited
2023 May 17 18:11
Refs
Refs
  • ProxyCommand - proxy command to use
  • ProxyJump - double ssh
  • PreferredAuthentications - publickey, password
  • LocalForward - local to remote port access
  • RemoteForward - remote to local port access
 
 

Forward Port config

How to add local forward setting to my ssh config file?
I currently can do this: ssh 12.34.56.78 -L 8888:localhost:8000 And I can then open my local browser to localhost:8888 and see the app running in my server at 12.34.56.78:8000. I want to avoid having to type in that forward command and instead place that config in my ssh config file.
How to add local forward setting to my ssh config file?

Proxy Jump

Does vscode remote support double ssh?
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
Does vscode remote support double ssh?

Remote Forward

Creating a ssh config for a reverse tunnel + local forward
The easiest way is probably to avoid the local forwarding, that appears unnecessary in your case, and leverage the ProxyJump directive, which lets you specify one or more jump proxies (i.e. one or more intermediate host(s) you connect to and from which you reach your target host).
Creating a ssh config for a reverse tunnel + local forward
 
 

Recommendations