在使用parallel-ssh
(和相关工具)执行任务时,我想使用受密码保护的 SSH 密钥。但是,我无法让它发挥作用。
所有关于 的文档都parallel-ssh
表明我应该能够使用--askpass
或-A
做到这一点:
-A
--askpass
Prompt for a password and pass it to ssh. The password may be
used for either to unlock a key or for password authentication. The
password is transferred in a fairly secure manner (e.g., it will not
show up in argument lists). However, be aware that a root user on
your system could potentially intercept the password.
Run Code Online (Sandbox Code Playgroud)
但是,当我输入密钥的密码时,它不起作用:
$ parallel-ssh --hosts=machines --user=my_user --askpass \
--timeout=0 …
Run Code Online (Sandbox Code Playgroud)