ssh翻墙 win+linux版本

首先你得有国外的ssh帐号,用户名+域or ip,你可以去这里购买,也可以在买空间的时候附赠ssh(猛击)…

Win

Win的市场占有率让我崩溃的想放弃fedora的推广了…不瞎扯

去官方下plink,然后进入windows下面的命令提示符or Ctrl+X, 输入 cmd, Enter,用cd进入plink所在的目录,在提示符后敲入以下命令

plink.exe  -N usrname@domain  -pw  password  -D 127.0.0.1:port

以firefox为例,在首选项–>高级–>网络–>链接设置 里面,SOCKS Host 填写 127.0.0.1,其他为空,后面的port就是上面命令你自己定义的端口就好

localhost 1080,这是即可访问国外网站了。

Linux

开始我很傻了吧唧的很2的跑去yum install putty, 然后照搬win…那么深爱的ssh阿,竟然被我忽略了… 现在立刻纠正

ssh -qTfnN -D port user@domain

解释如下

-q :  be very quite, we are acting only as a tunnel.

终端无输出,如果你要看到过程的话,忽略这个选项

-T :  Do not allocate a pseudo tty, we are only acting a tunnel.

不远程登录,仅仅是作为tunnel

-f :  move the ssh process to background, as we don’t want to interact with this ssh session directly.

输入完密码后(如果需要的话),直接返回shell提示符,你可以运行其他程序,甚至关掉这个终端

-N :  Do not execute remote command.

排除安全隐患

-n : redirect standard input to /dev/null.
In addition on a slow line you can gain performance by enabling compression with the -C option.

压缩传输,不过这个对于速度快的应该没什么必要

3 thoughts on “ssh翻墙 win+linux版本

Leave a Reply

Your email address will not be published. Required fields are marked *