SSH over proxy
Posted on February 18, 2008 - Filed Under 互联网 |
一直都是用SecureCRT连接ssh服务器
由于我们的网络环境比较特殊,服务器在电信,但是我们办公的出口是网通
于是我用了一个在双通机房的sock服务器来proxy
SecureCRT很简单就可以设置使用代理了
今天在研究rsync,打算over ssh来使用
用cygwin装了rsync和openssh
但是直接用ssh连接实在太慢了
研究了半天,终于搞定ssh的proxy配置
从这里得知,通过在~/.ssh/config加入ProxyCommand来实现
但是我试过几个版本的netcat,都没有-X -x的参数
而connect-proxy根本不知道在哪里能找到
有一个朋友说可以用Corkscrew,但是它只支持http proxy
还有一个connect.c,不过网站挂了
最后终于被我找到这个,似乎就是connect.c的新网站,使用方法都一模一样
Features of connect.c are:
* Supports SOCKS (version 4/4a/5) and https CONNECT method.
* Supports NO-AUTH and USERPASS authentication of SOCKS
* Partially supports telnet proxy (experimental).
* You can input password from tty, ssh-askpass or environment variable.
* Run on UNIX or Windows platform.
* You can compile with various C compiler (cc, gcc, Visual C, Borland C. etc.)
* Simple and general program independent from OpenSSH.
* You can also relay local socket stream instead of standard I/O.
因为我是在windows下使用cygwin,懒得用gcc编译了
下载了connect.exe,放在c:\windows
然后在~/.ssh/config加入
ProxyCommand connect -S x.x.x.x:x %h %p
Most Commented Posts
Comments
One Response to “SSH over proxy”
Leave a Reply
ssh 的确很好
在线代理更方便哦
http://web-php-proxy.com/