当尝试使用Fabric 1.6遍历SOCKS5代理到RHEL5 Linux主机时,该命令返回,但没有输出返回到stdout。
$> fab -H myhost -f ./fabfile.py remote_test --show=debug Using fabfile '/home/myuser/fabric/fabfile.py' Commands to run: remote_test Parallel tasks now using pool size of 1 [myhost] Executing task 'remote_test' [myhost] run: echo testing Enter SOCKS5 password for myuser: [myhost] Login password for 'myuser': $> echo $? 0 $>
remote_test函数是:
def remote_test(): run('echo testing')
如果我对非SOCKS5主机运行该命令,它工作正常。
我正在运行最新的版本,虽然我没有date得到这个工作:
Python 2.7.3
Paramiko == 1.10.0
pycrypto == 2.6
织物== 1.6.0
RHEL5.9
的openssh-4.3p2-82.el5
我的〜/ .ssh / config如下所示:
Host *.domain ProxyCommand connect -S socksproxy.domain:1080 %h %p
并使用从http://www.meadowy.org/~gotoh/ssh/connect.c构build的连接二进制文件
我还没有从公司networking获得github,所以当我有机会的时候我也会问。
有没有人有任何想法,为什么这可能发生?
谢谢Matt
我使用connect
而不是fabric,但答案肯定是一样的。 在connect.c
中有一个解释, SOCKS5_PASSWORD
, HTTP_PROXY_PASSWORD
和CONNECT_PASSWORD
是你想要的。 我有一个名为ssh-tbb
的脚本,如下所示。
#!/bin/bash export CONNECT_PASSWORD="" exec ssh -o ProxyCommand="connect -5 -S 127.0.0.1:9150 %h %p" $*
理想情况下,应该调用这个脚本ssh-tor
并检测tor
是否在端口9050或9150上生存。