Python 使用Fabric/Paramiko遍历SOCKS5代理时无输出

Python 使用Fabric/Paramiko遍历SOCKS5代理时无输出,python,linux,ssh,fabric,paramiko,Python,Linux,Ssh,Fabric,Paramiko,当尝试使用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

当尝试使用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
$>
远程测试功能是:

def remote_test():
    run('echo testing')
如果我对非SOCKS5主机运行该命令,它可以正常工作

我正在运行最新的版本,尽管到目前为止我还没有让它工作:

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
并使用从

我还没有从公司网络访问github,所以我也会在有机会的时候询问

有人知道为什么会这样吗

谢谢
马特

我使用的是
连接
而不是织物,但答案肯定是一样的。
connect.c
中解释了
SOCKS5_密码
HTTP_代理_密码
connect_密码
可以执行您想要的操作。我有一个名为
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上

仅建立一个连接和/或使用stdin时,不要使用并行模式。此时不要使用并行模式,无论提示输入密码(由于不明确,无论如何无法在并行模式下处理密码)