SCP from STDIN: "-t" option undocumented?
Thomas Charron
twaffle at gmail.com
Thu Dec 22 16:33:11 EST 2011
Not sure about scp, but you could use:
ssh 192.168.1.2 "cat > destFile"
On Thu, Dec 22, 2011 at 4:25 PM, John Abreau <jabr at blu.org> wrote:
> Long ago, I was looking for a way to make scp read from stdin, and I
> had no luck.
>
> Earlier this afternoon, when I was tweaking my "validate-rsync" script to add
> support for scp, I discovered that when running the command
>
>> scp foo remote:/path/to/bar
>
> the remote end gets invoked as
>
>> scp -t /path/to/bar
>
> It seems that the scp process on the local machine establishes an ssh
> connection
> to the remote machine, and then invokes an scp process on the remote machine,
> and that remote scp process has to read from stdin.
> When I checked the scp man page, there was no mention of the -t
> option, nor is it
> listed in "scp --help". A google search for "scp -t" didn't locate any
> mention of
> the option, and another google search for "scp from stdin" yielded nothing but
> questions of how to do it followed by replies that "scp cannot read
> from stdin".
>
> Is this documented anywhere? I don't understand why the option would be
> left out of the man page.
>
> --
> John Abreau / Executive Director, Boston Linux & Unix
> Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
> PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
--
-- Thomas
More information about the gnhlug-discuss
mailing list