2017-07-26 12 views
1

私はローカルウィンドウのコマンドラインからplink -pw password [email protected]を使用しました。Windowsのコマンドラインから「y」を与えないでホスト鍵認証

それは私が自動的にPLINKコマンドから "Y" を与えることができますどのように enter image description here

N/ホストキーの確認yについて尋ねましたか?

echo Y| plink -pw password [email protected]を使用しましたが、動作しません。ここで

+0

使用しているOSはWindowsですか?なぜ私はそこにlinuxコマンドのような何かを参照してください? – minhhn2910

+0

'plink'は、' y'を選択した後、同じリモートに対して再度尋ねるべきではありません。スクリプトを使ってリモコンを追加しますか?指紋を確認する必要があります。これはセキュリティ対策です。 – Melebius

+0

@ minhhn2910あなたはもっと具体的になりますか? ['plink'はWindowsのバイナリです](http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter7.html#7.1)、' echo'とパイプ( '|')を使うことができます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、-batch isまた働いていない。 –

関連する問題