Re: Why are the arguments supplied for the command run through ssh interpreted by shell before they are passed to the command on the server side?

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

 



On Sat, 11 Jan 2020, Yuri wrote:

> On 2020-01-11 08:57, Thorsten Glaser wrote:
> > If you wish for no local expansion, quote locally, such as:
> > 
> > ssh -l luser remotehost '
> > 	command1
> > 	command2
> > 	…
> > '

> This didn't work for me because single quotes only prevent local expansion.

Then you didn’t do it right.

> The string is expanded on the remote host.

Yes, “command1” is expanded remotely, but you use the quoting rules
of the remote shell INSIDE the single quotes for the local POSIX shell
to prevent that (just replace all ' with '\'' and you’re set).

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux