Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

3 Answers 3

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
share|improve this answer

use the -x argument.

Example

pssh  -i  -H ubuntu@xxxxxxx.compute-1.amazonaws.com  -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

 
discard

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.