0

I have a text file, like this:

cat hed.txt
10.21.23.12
10.23.12.12

I can ssh to each ip without without prompting for the key verification.

I want to run a command on each of these IPs, so I was using pdsh. I tried multiple options, but I am getting following error:

pdsh -w  ^hed uptime
00f12e86-cfcc-4239-9dfc-006b65a319c3: ssh: Could not resolve hostname 00f12e86-cfcc-4239-9dfc-006b65a319c3: nodename nor servname provided, or not known
pdsh@saurabh: 00f12e86-cfcc-4239-9dfc-006b65a319c3: ssh exited with exit code 255

I mentioned here, I tried following as well, but this also gave same error.

PDSH_SSH_ARGS_APPEND="-o StrictHostKeyChecking=no" pdsh  -R ssh -w  ^hed  uptime

Also tried comment from here, but no help.

PDSH_SSH_ARGS_APPEND="-o StrictHostKeyChecking=no" pdsh  -R ssh   ^hed  uptime
pdsh@saurabh: no remote hosts specified

I am able to do csshx on these via: csshX --host hed.txt, which works but pdsh will suit more for my work which is not working.

Saurabh
  • 71,488
  • 40
  • 181
  • 244

1 Answers1

0

Ahh, This worked like this:

pdsh -w  '^hed.txt' uptime

For my colleagues it is working without quotes as well with same version of pdsh, which is weird.

Saurabh
  • 71,488
  • 40
  • 181
  • 244