ssh是什么?
ssh是一个安全通道协议
plink是什么?
plink是这个通道协议的一个实现。
怎么用?
首先您得有个ssh帐号(至于怎么得,看你自己啦)
其次,把plink下载到桌面后,把下面内容保存为ssh.bat,运行之
[bash]
@echo off
plink -C -v -N -D 7070 -l 用户名 -pw 密码 服务器名
[/bash]
说明:
* 换成相应的信息,参数之间是有个空格的。
* -C表示压缩数据 -v表示显示输出信息 -N 表示不打开远程终端 -D 表示映射本地端口 -l 表示登陆名 -pw 表示密码
* 如果要指定远程端口,使用参数-P,如指定远程端口1024,-P 1024
* 初次登陆会问你y/n, 按y
* 密码可能要双引号。如密码是&zerwerjk , 参数-pw要变成 -pw “&zerwerjk”
针对问y/n,官方的说法是这样的
To avoid being prompted for the server host key when using Plink for an automated connection, you should first make a manual connection (using either of PuTTY or Plink) to the same server, verify the host key (see section 2.2 for more information), and select Yes to add the host key to the Registry.