我一直在尝试设置一个 SSH 跳转服务器,以便在工作时连接到我的服务器,它使用了一个非常烦人(且缓慢)的公司代理,并阻止除端口 443 和 80 之外的所有外部连接。
我已经设置了一个测试服务器,如果可行的话,我将使用它作为跳转服务器,以接受端口 443 上的 SSH 连接。
这就是我尝试连接的方式
ssh -vvv ubuntu@jump-ssh-server -p 443 -o ProxyCommand="ncat --proxy proxy_server:3128 --proxy-auth proxy_user:proxy_password -C %h %p"
Run Code Online (Sandbox Code Playgroud)
如果我尝试仅ProxyCommand在终端中运行它就可以了。但是,当我尝试使用 ssh 连接运行它时,出现错误
OpenSSH_8.6p1, LibreSSL 3.3.5
debug1: Reading configuration data /Users/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug2: resolve_canonicalize: hostname jump_server is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/user/.ssh/known_hosts2' …Run Code Online (Sandbox Code Playgroud)