[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can someone explain this?

From: Jon Seymour
Subject: Re: Can someone explain this?
Date: Sat, 12 Feb 2011 18:09:11 +1100

On Sat, Feb 12, 2011 at 4:54 PM, Bob Proulx <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]