Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在脚本中使用 scp,通常应该始终使用私钥身份验证。如果由于某种原因缺少私钥,我希望脚本失败而不是显示密码提示。
是否可以禁用此提示,或者以某种方式指定应始终使用私钥身份验证?
我正在寻找的选项是-B:
-B
-B Selects batch mode (prevents asking for passwords or passphrases).