2017-07-26 63 views
1

我從本地windows命令行使用plink -pw password [email protected]從Windows命令行不給「y」的主機密鑰驗證

它要求主機密鑰確認Y/N enter image description here

我怎麼能自動給 「Y」 從砰砰命令?我使用echo Y| plink -pw password [email protected],但它不起作用。

+0

您正在使用的操作系統是Windows?爲什麼我在那裏看到類似linux的命令? – minhhn2910

+0

選擇'y'後,'plink'不應再問你同一個遙控器。你想使用腳本添加遙控器嗎?指紋應該被檢查,這是一個安全措施。 – Melebius

+0

@ minhhn2910你能更具體嗎? ['plink'是一個Windows二進制文件](http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter7.html#7.1),可以使用echo和pipe('|')在Windows和Linux上。 – Melebius

回答

-1

這裏是plink總體使用情況:

plink 
PuTTY Link: command-line connection utility 
Release 0.53 
Usage: plink [options] [[email protected]]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開關是你在找什麼。

+0

嗨MichaelS, - 批次是也沒有工作。 –

相關問題