5

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

3 Answers 3

14

use the -x argument.

Example

pssh  -i  -H [email protected]  -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.

9

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 *.compute-1.amazonaws.com
    IdentityFile ~/.ssh/ec2.pem
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .