简体   繁体   中英

Always use private key authentication for scp

I'm using scp in a script, which normally should always use private key authentication. If for some reason the private key is missing, I want the script to fail rather than display a password prompt.

Is it possible to disable this prompt, or to somehow specify that private key authentication should always be used?

我一直在寻找的选项是-B

-B      Selects batch mode (prevents asking for passwords or passphrases).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM