3

When trying to traverse a SOCKS5 proxy to a RHEL5 Linux host using Fabric 1.6, the command returns but no output is returned to the 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
$>

The remote_test function is:

def remote_test():
    run('echo testing')

If I run the command against a non SOCKS5 host it works fine.

I am running the latest builds, although I haven't to date gotten this to work:

Python 2.7.3

Paramiko == 1.10.0

pycrypto == 2.6

fabric == 1.6.0

RHEL5.9

openssh-4.3p2-82.el5

My ~/.ssh/config looks like the following:

Host *.domain
    ProxyCommand connect  -S socksproxy.domain:1080 %h %p

And using the connect binary built from http://www.meadowy.org/~gotoh/ssh/connect.c

I haven't got access to github from the Company network so I will ask there when I get a chance as well.

Has anyone got any ideas why this could be occuring?

Thanks Matt

4

1 回答 1

0

我使用connect而不是面料,但答案肯定是一样的。有一个connect.c解释SOCKS5_PASSWORDHTTP_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 上。

于 2014-10-29T00:44:35.510 回答