Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run an Parallel SSH with Amazon Instances, But I am getting Permission denied expception, How ever I can SSH it to the server. How we can run PSSH with key login. So far I have tried like,

pssh -h hosts-file -i xxx.pem -l username date
share|improve this question

The -i parameter of parallel-ssh doesn't specify the keyfile like it does for ssh. You need to add something like this to your ~/.ssh/config to get SSH to use the right keyfile.

Host *
    IdentityFile ~/.ssh/ec2.pem
share|improve this answer

use the -x argument.


pssh  -i  -H  -x "-oStrictHostKeyChecking=no  -i /home/ccc/xxx/something-us-east.pem" 'echo hi'

Whatever u put in -x gets passed as arguments to the underlying ssh process.

share|improve this answer

Please ensure that you can ssh to each of these instances using ssh and ensure that the same xxx.pem works for all instances. Once you do that, the pssh command will work. You may have to copy your public key to each instance and add an entry to the .ssh/authorized_keys file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.