Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a good way to copy files to arbitrary paths on target #6

Open
baransn opened this issue Apr 2, 2013 · 1 comment
Open

a good way to copy files to arbitrary paths on target #6

baransn opened this issue Apr 2, 2013 · 1 comment
Assignees

Comments

@baransn
Copy link

baransn commented Apr 2, 2013

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
@ndenev
Copy link
Owner

ndenev commented Apr 7, 2013

Hi,

As I recently added the -r option, I didn't had much time to clean it up and fix some minor stuff, but soon I hope to have some more spare time and I will also try to add the ability to scp files to arbitrary locations.
I might as well create this to be a separate "mpscp" program, but I will think about it.
For now the easies way to do this apart from remote scp/wget is probably to disable the exec of the remote file, but
this stll will result in 2 ssh connections to each host as currently the scp is executed as a "LocalCommand" before ssh.

@ghost ghost assigned ndenev Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants