-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I'd like to use mpssh to copy over a file from one location to multiple locations.
I think the -r option you're currently building copies a script and executes it on the target (also very useful), but I'd like to deploy a jar file on each host.
I've explored utilizing ssh's ability to copy over files:
ssh HOST cat < LOCALFILE ">" REMOTEFILE
by doing this:
mpssh -f ~/hosts.list cat < LOCALFILE '">" REMOTEFILE'
but it complains of too many arguments. It appears that redirection isn't supported, only one argument is allowed and that must be the command to execute on the remote host.
One workaround would be to use scp/wget from the remote to grab the file hosted in a central location -- but that gets a little ugly. Should there be a separate mpscp program to just focus on remote copy? Should mpssh support copying files to arbitrary locations (an expansion of the -r option)?
Thanks,
- Baran