plinkコマンドの対話型プロンプトに 'y'を渡します。

plinkコマンドの対話型プロンプトに 'y'を渡します。

plinkリモートサーバーへの接続を確立し、次のコマンドを使用してSIPユーザーディレクトリリストからエントリを削除しようとします。

plink root@<server-ip> -pw pwd serctl ul rm bob

それから次の質問をしてください。

The server's host key is not cached. You have no guarantee
that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 5d:ae:ae:ad:46:71:30:6d:0c:0e:30:e1:cd:f7:6b:90
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)

これは、コマンドが初めて実行されるときに発生します。スクリプトでこのコマンドを実行すると、インタラクティブプロンプトは常に同じことを要求しますが、応答がないため、同じことを何度も尋ねて印刷します。

Store key in cache? (y/n) Connection abandoned.

マニュアルページからフリンク、optionsを使用して対話型プロンプトを無視する方法を理解しましたが、-batch応答が肯定的であることを確認したいと思いますy。つまり、応答が明示的であることをどのように確認できますかy?これをコマンドに追加する方法はありますか?

ベストアンサー1

yesディストリビューションで利用可能な場合は、コマンドを試すことができます。たとえば、次を参照してください。

たとえば、(はい、タイトルはほぼ同じですが、2つの異なる質問です)。

おすすめ記事