下面是我的一段非常简单的代码,旨在通过8888端口上的本地socks代理连接到ssh服务器
import subprocess
host = 'X.x.X.x'
port = 22
subprocess.call( [
"ssh",
"-o", "ProxyCommand='/bin/socat - SOCKS4A:127.0.0.1:%h:%p,socksport=8888'",
"-p", "{}".format(port),
"root@{}".format(host)
])
但是,我在尝试执行时收到了一条丑陋的错误消息
/bin/bash: /bin/socat - SOCKS4A:127.0.0.1:X.x.X.x:22,socksport=8888: No such file or directory
ssh_exchange_identification: Connection closed by remote host
什么是trange是直接在shell上复制粘贴完整命令行时的工作
目前没有回答
相关问题 更多 >
编程相关推荐