パスフレーズで保護されたSSHキーをparallel-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.
ただし、キーのパスフレーズを入力すると機能しません。
$ parallel-ssh --hosts=machines --user=my_user --askpass \
--timeout=0 --inline -v 'sudo apt-get update'
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password:
[1] 09:59:36 [FAILURE] amritiii Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[2] 09:59:37 [FAILURE] gbdev Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[3] 09:59:37 [FAILURE] code Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[4] 09:59:37 [FAILURE] apollo Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[5] 09:59:37 [FAILURE] odin Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[6] 09:59:37 [FAILURE] hathor Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[7] 09:59:37 [FAILURE] ldap Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[8] 09:59:37 [FAILURE] thor Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
[9] 09:59:37 [FAILURE] bioserver Exited with error code 255
Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa':
Permission denied (publickey,password).
私のSSHキーとパスフレーズが各マシンで機能することを確認したので、これを機能させる方法がわかりません。
parallel-ssh
とpssh
確かに同じです。