SSH的tunnel用法小记

作为一个tunnel,我们需要这样的参数来启动它(具体作用你懂得~)

ssh -qTfnN -D 7070 username@remote_server -p 22

 

下面是参数详解

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

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

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

  -N :- Do not execute remote command.

  -n :- redirect standard input to /dev/null.

  -p :- SSH Server Port.

  In addition on a slow line you can gain performance by enabling compression with the -C option.</span></span>

在linux系统里可以把命令用alias方式写入.bashrc

alias fuckgfw='ssh -qTfnN -D 7070'

然后执行

fuckgfw server_name

 

参考文章:http://www.issh.in/tutorial/11

2012-06-24 21:23361tunnel翻墙用法ssh代理