无需配置文件,通过CLI用VSCode Remote-SSH经ProxyJump打开远程文件夹
无需SSH配置文件,通过ProxyJump用VSCode Remote-SSH打开远程文件夹可行吗?
我目前通过SSH配置文件,使用VSCode Remote-SSH扩展经ProxyJump连接服务器,配置如下:
Host myserver ProxyJump user@jumpserver User user ForwardX11 true ForwardX11Trusted yes Hostname remoteserver
通过以下命令可从CLI打开服务器上的指定文件夹:
code --folder-uri "vscode-remote://ssh-remote+myserver/path/to/folder"
已知无需配置文件时,可直接用以下命令连接SSH服务器并打开文件夹:
code --folder-uri "vscode-remote://ssh-remote+username@server_ip_address/path/to/folder"
想知道是否存在无需配置文件、通过跳转服务器打开文件夹的方法?
2024年7月16日更新
我在GitHub仓库提交相关issue后,收到ms-vscode-remote.vscode-remote-extensionpack扩展开发者的回复:
So you basically want to connect with that same config, without having to write the ssh config file? No, we don't currently offer a way to pack arbitrary connection parameters into a URI.
简言之,目前无法实现该需求。
内容的提问来源于stack exchange,提问作者atteggiani
相关产品推荐
相关产品推荐

