Re: AuthorizedKeysCommand size issue?

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

 



On 2014-04-15 10:57, Dag-Erling Smørgrav wrote:
Yves Dorfsman <yves@xxxxxxxxx> writes:
Dag-Erling Smørgrav <des@xxxxxx> writes:
Shouldn't 'curl ... | cat' suffice?
Tried that before, it returns an exit code 141.

What returns exit code 141?

I suspect bash is returning the exit code from cat.


If the curl command line you're using normally prints the file to
stdout, then curl | cat will do exactly the same, cat will buffer it.

I agree, and that's why I tried it early on, I'm not sure where the problem is there.

However, the command line you're using will _not_ print the file to
stdout.

No, curl output to stdout by default.

Uh, echo does not interpret the $ sign.  The shell does, and you want it
to.

Darn, decades of UNIX and I still run into this! I feel terrible...

  $() is equivalent to ``, so entire construct is replaced with
whatever curl outputs.  Note that the double quotes ensure that the
entire output is passed to echo as a single argument, rather than split
into words, thus preserving whitespace.

Yes, adding the double quotes around it worked. Thanks. This actually is a very elegant work around, both in terms of speed and security.

--
Yves.

_______________________________________________
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