Re: AuthorizedKeysCommand size issue?

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

 



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?

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.
However, the command line you're using will _not_ print the file to
stdout.  It will save it in the current working directory, which is most
likely /var/empty, which is not writable.  You need to add -o- to your
curl command line to have it print the file to stdout:

  curl -s -o- --compressed http://someurl.example.com/pubkeys/$1

> > Or even 'echo "$(curl ...)"'
> Can you completely prevent echo from interpreting $ sign?

Uh, echo does not interpret the $ sign.  The shell does, and you want it
to.  $() 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.

DES
-- 
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
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