2013年6月18日 星期二

[Mac] ssh remote server through socks proxy - 經由socks proxy ssh到遠端Server

1. Install ProxyChains

$ wget https://gist.github.com/allenhuang/3792521/raw/bb52568695f9d745004eee87b892637f9d17a771/proxychains4_formula.rb
$ mv proxychains4_formula.rb /usr/local/Library/Formula/Proxychains.rb
$ brew install --HEAD proxychains

2. Modify ProxyChains conf

$ vim /usr/local/etc/proxychains.conf

set this line to conf:

socks4 127.0.0.1 8888

3. Open socks

ssh -vND 8888 user@socks.server

4. Settings Socks Proxy on Mac Network Preference

5. Connect to remote server

$ /usr/local/bin/proxychains4 ssh user@remote.server

Related Posts Plugin for WordPress, Blogger...