On Sat, Feb 12, 2011 at 4:54 PM, Bob Proulx <bob@proulx.com> wrote:
> I am a big fan of piping the script to the remote shell.
>
> $ echo "cd /tmp && pwd" | ssh example.com bash
> /tmp
>
> This has two advantages. One is that you can pick your shell on the
> remote host. Otherwise it runs as whatever is configured for that
> user in the password file. If the remote host has csh configured then
> this overrides it and provides a known shell on the remote end. Two
> is that since this is stdin it avoids having two different shells
> parse the command line. Quoting is then much simplified.
>
Makes sense...thanks.
jon.