其它 · 2011-07-21

plink的使用方法

基本格式

plink  选项  user@host  命令

选项介绍

-ssh 强迫使用ssh协议,其实默认的就是ssh

-P port 连接到指定的端口, 一般默认是22 -l user 用户名, 如果你不愿意使用user@host的格式的花

-pw “FuckGFW” 使用FuckGFW作为password,嘿嘿ie

-D [listen-IP:]listen-port 动态socks端口转发 这个最重要, listen-ip 可以填127.0.0.1也可不填,也可填你的外部IP,比如192.168.0.99

另外两个转发参数

-L [listen-IP:]listen-port:host:port 转发本地端口 到 远程主机地址 -R [listen-IP:]listen-port:host:port 转发远程端口 到 本地地址

-X -x enable / disable X11 forwarding -A -a enable / disable agent forwarding -t -T enable / disable pty allocation

-1 -2 force use of particular protocol version -4 -6 force use of IPv4 or IPv6 -C 使用压缩传输

-i key private key file for authentication

-N don’t start a shell/command (SSH-2 only) 不要开启shell

范例

plink.exe -4 -C -N -i d:\key.ppk -D 127.0.0.1:7080 -l b335925 205.196.216.115

plink -N 205.196.216.115 -l username -pw “FuckGFW” -D 127.0.0.1:7080

很多参数 跟OpenSSH是一样的,不过OpenSSH我也记不住