On Dec 1, 2014 7:02 AM, "Priyal Jain" <jpri...@juniper.net> wrote:
>
> Thanks, and on the basis of performance like speed and robustness which is
> better??
>

So I've never had the need for either - run local or remote or managed
(puppet/chef or the perl solution I can't think off hand). And for
performance they're probably equal or too many variables here for you to
benchmark accurately.

However, I'd use whichever I knew better and could generate cleaner code
with. Ie, this is what I think I could do in bash:
output=$(ssh host << REMOTE-CODE
# logic on the remote box - can use variables from outside.
REMOTE-CODE)

Which looks kinda ugly. Obviously I'd have an $ssh_params to do -o
MasterControl and the like and maybe set a local fifo instead of using a
heredoc and substitution (and then triggering stuff on egrep -q or w/e
which probably makes the code cleaner). But I still see that as being ugly.

I could also use ssh's RemoteCommand and ProxyCommand options to make it so
that *nobody* would understand wtf I was doing as well.

Really I think neither solution is a good tool for the job. You might
consider stepping back and explaining what you actually want to do.

Reply via email to