我在本地Windows命令行中使用了plink -pw password ec2-user@10.0.0.0
。
如何从plink命令自动给出“y”?
我使用echo Y| plink -pw password ec2-user@10.0.0.0
,但它没有用。
答案 0 :(得分:-1)
以下是plink
的使用情况概述:
plink
PuTTY Link: command-line connection utility
Release 0.53
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-v show verbose messages
-load sessname Load settings from saved session
-ssh -telnet -rlogin -raw
force use of a particular protocol (default SSH)
-P port connect to specified port
-l user connect with specified username
-m file read remote command(s) from file
-batch disable all interactive prompts
The following options only apply to SSH connections:
-pw passw login with specified password
-L listen-port:host:port Forward local port to remote address
-R 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
-C enable compression
-i key private key file for authentication
我想-batch
开关就是你想要的。