qutty小工具Plink妙用

发布于 / 每日 / qutty小工具Plink妙用已关闭评论

qutty小工具Plink妙用
发布时间:May 1, 2012 // 分类:Windows // No Comments
提及Putty大家都不陌生,Putty自带的工具Plink同样强大,本文就简单介绍下几种用法。
Plink使用参数:

1234567891011121314151617181920212223242526272829303132333435 Usage: plink [options] [user@]host [command]Options:  -V        print version information and exit  -pgpfp    print PGP key fingerprints and exit  -v        show verbose messages  -load sessname  Load settings from saved session  -ssh -telnet -rlogin -raw -serial            force use of a particular protocol  -P port   connect to specified port  -l user   connect with specified username  -batch    disable all interactive promptsThe following options only apply to SSH connections:  -pw passw login with specified password  -D [listen-IP:]listen-port            Dynamic SOCKS-based port forwarding  -L [listen-IP:]listen-port:host:port            Forward local port to remote address  -R [listen-IP:]listen-port:host:port            Forward remote port to local address  -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        enable compression  -i key    private key file for authentication  -noagent  disable use of Pageant  -agent    enable use of Pageant  -m file   read remote command(s) from file  -s        remote command is an SSH subsystem (SSH-2 only)  -N        don’t start a shell/command (SSH-2 only)  -nc host:port            open tunnel in place of session (SSH-2 only)  -sercfg configuration-string (e.g. 19200,8,n,1,X)            Specify the serial configuration (serial only)

1.动态转发端口,可用于代*理上网哦。

1 plink -N -D 127.0.0.1:7070 root@192.168.1.2 -pw passwd
eg:socks
plink -N -D 127.0.0.1:60004 root@104.128.68.220 -pw IF0g9xxxxx
2.转发本地端口到远程服务器

12 plink -N -L 127.0.0.1:2222:google.com:80 root@haiyun.me -pw passwd#通过haiyun.me将本地2222端口转发google.com 80端口,浏览器打开127.0.0.1:2222就是谷歌网站
eg:
plink -N -L 127.0.0.1:9999:104.128.68.220:60004 root@104.128.68.220 -pw IF0g98xxxxx
3.登录ssh服务器并依次执行文件内的命令。

1 plink -m cmd.txt root@www.haiyun.me -pw passwd
eg:
plink -m C:\Users\Administrator\Desktop\cmd.txt root@104.238.221.248 -pw 3dz4n3JVeQxxx
4.内网穿透,转发远程服务器端口到本地端口,远程监听指定地址查看:http://www.haiyun.me/archives/1010.html

12 plink -N -R 0.0.0.0:2222:localhost:3389 root@haiyun.me -pw passwd#转发haiyun.me 2222端口到本地3389端口

转载原创文章请注明,转载自: 一个视界·触手可及 - 凌肖 » qutty小工具Plink妙用