I'd like to use my passphrase protected SSH key when performing tasks with parallel-ssh (and related tools). However, I can't get this to work.All the documentation, regarding parallel-ssh, show that I should be able to use --askpass or -A to do this:-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.However, when I enter the passphrase of my key, it doesn't work:$ 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 superuserprivileges or access to your account.Password: [1] 09:59:36 [FAILURE] amritiii Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[2] 09:59:37 [FAILURE] gbdev Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[3] 09:59:37 [FAILURE] code Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[4] 09:59:37 [FAILURE] apollo Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[5] 09:59:37 [FAILURE] odin Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[6] 09:59:37 [FAILURE] hathor Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[7] 09:59:37 [FAILURE] ldap Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[8] 09:59:37 [FAILURE] thor Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).[9] 09:59:37 [FAILURE] bioserver Exited with error code 255Stderr: Enter passphrase for key '/home/nhaigh/.ssh/id_rsa': Permission denied (publickey,password).I've confirmed that my SSH key and passphrase work on each of the machines so I have no idea how to get this working.
parallel-ssh with Passphrase Protected SSH Key
ssh;parallel;key authentication
Assuming that parallel-ssh and pssh are equivalent then yes what you're attempting to do should work just fine with piping the passphrase in using the -A switch.ExampleHere's an example where I connect to 2 different systems, host1 and host2. I use the -l switch to pssh to provide a default user of root. However on host2 I override this in the -H switch by specifying the hostname as user1@host2. $ pssh -A -i -H host1 user1@host2 -l root 'echo hi'Warning: do not enter your password if anyone else has superuserprivileges or access to your account.Password: [1] 21:38:00 [SUCCESS] user1@host2hiStderr: This is a private site.  Unauthorized connections are prohibited.  All activity may be logged.  Disconnect immediately if you object to this policy or are not an authorized user.X11 forwarding request failed on channel 1Killed by signal 1.[2] 21:38:00 [SUCCESS] host1hiStderr: This is a private site.  Unauthorized connections are prohibited.  All activity may be logged.  Disconnect immediately if you object to this policy or are not an authorized user.ControlSocket /home/user1/.ssh/master-user1@ssh-tunnel.mydomain.com:22 already exists, disabling multiplexingX11 forwarding request failed on channel 0Killed by signal 1.When the above works you'll notice the output of the command I'm running, echo hi.Your issueThe problem you're running into with a passphrase on your SSH key pair is due to a bug. This is the bug titled: Issue 80: Not passing passphrase?. The 4th comment to that issue shows a patch:excerpt#4 robine...@gmail.comI changed the line to  if not ( prompt.strip().lower().endswith('password:') or         'enter passphrase for key' in prompt.strip().lower()):and it seems to workReferencesPSSH : Parallel SSH to execute commands on a number of hosts