【问题标题】:Possible to make vscode use a proxy upstream of remote-ssh?可以让 vscode 使用 remote-ssh 上游的代理吗?
【发布时间】:2021-09-29 17:50:22
【问题描述】:

问题:

有没有办法通过我的现场工作站在 vscode 中建立所有传出 ssh 连接(包括由 remote-ssh 插件建立的连接)?我可以完全控制该机器的防火墙,并且可以根据需要打开 ufw 上的端口以进行异地访问。

背景:

我在现场使用 vscode remote-ssh 连接到研究计算集群。 对于远程工作,我想避免在 mac os 11.6 中使用 cisco anyconnect 作为 vpn,因为路由和其他 os 功能会出现意外行为。

【问题讨论】:

    标签: visual-studio-code ssh tunnel


    【解决方案1】:

    结果在 mac os 中,通过指定我在 ProxyCommand 选项中控制的现场代理主机来编辑 ~/.ssh/config 文件就足够了:

    Host clusterNode
      ProxyCommand  ssh me@my_accessible_ssh_host nc %h %p
      HostName <firewalled node ip address>
      User my_cluster_username
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 2020-11-29
      • 1970-01-01
      • 1970-01-01
      • 2023-01-18
      • 1970-01-01
      相关资源
      最近更新 更多