ytzhangFTD / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

pssh - allow command to come in from stdin #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently it's possible to pass ssh a script via stdin to run on the remote
machine like:

ssh user@host < script.sh

but when I try the equivalent with pssh:

pssh -h hosts.txt < script.sh

I get an error "pssh: error: Command not specified".

Would it be possible for pssh to allow the command to be run on the remote
machines come in via stdin like ssh does?

Original issue reported on code.google.com by ryan.bro...@gmail.com on 4 Nov 2009 at 1:55

GoogleCodeExporter commented 8 years ago
Interesting.  I've never even realized that ssh lets you do that.  I think this 
might 
need a little more thought before plunging ahead.  For example, what should 
happen if 
someone doesn't specify a command but doesn't give any input on stdin either?  
Should 
pssh throw an error in this case?

Original comment by amcna...@gmail.com on 16 Feb 2010 at 8:38

GoogleCodeExporter commented 8 years ago

Original comment by amcna...@gmail.com on 19 Feb 2010 at 3:15

GoogleCodeExporter commented 8 years ago
I've made and commited a -I option as a fix for issue #12.  I've also commited 
a 
change that allows the script to be passed on standard input (when -I is 
given), but 
if I get negative feedback about the -I option, this might need to be revisited.

Please try out the latest changes (in the Git repository), and let me know what 
you 
think.  Be sure to chime in on issue #12 if you have an opinion about that.

Thanks for your help with pssh.

Original comment by amcna...@gmail.com on 19 Feb 2010 at 8:26

GoogleCodeExporter commented 8 years ago
I haven't heard back since I made the fix, so for now I'll assume that this 
works.  
I'll close the bug, but please reopen it if you have any problems.  Thanks for 
your 
contribution.

Original comment by amcna...@gmail.com on 24 Feb 2010 at 7:12