Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 able to connect to a remote machine using the following command:

/usr/bin/adm/pdsh -l root -w "loop"

but when I try to execute any command it gives following error:

pdsh> cd /var
loop: Permission denied, please try again.
loop: Permission denied, please try again.
loop: Permission denied (publickey,password).
pdsh@rushi: loop: ssh exited with exit code 255

Please, can anyone provide any solution to this? Thanks.

share|improve this question

The problem is that you don't have permission to log on the remote machine. When you type the first command pdsh ..., it really doesn't connect to the server. It does when you try to execute any command, like cd /var. As pdsh is intended to execute commands in parallel, I suggest you to configure public key authentication:

  1. Do ssh-keygen -t rsa on your server. You will be prompted to select the name and location of the key and the files.
  2. Open the .pub file you generated on the previous step and copy the full text.
  3. Paste that text on the /root/.ssh/authorized_keys file on the remote server (loop). If the file does not exist you can create it safely. (Remember to set appropriate perms, like 600 ).
  4. Profit!
share|improve this answer
If you have configured keys, it might also be you configured you key with a password. My version of pdsh will balk at that under normal run conditions. If so, generate a new key, leave it passwordless, copy it to the remote servers and try again. – j03m Dec 14 '12 at 1:51
@j03m You might want to post this as an answer as this has just hit me as well. – Adrian Frühwirth Sep 3 '13 at 6:55

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.