Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

[Discuss] SCP from STDIN: "-t" option undocumented?



That's typical of the workarounds suggested by those who thought that
scp was unable to read from stdin.  My question was really about why
the functionality is undocumented, since scp actually *is* able to
read from stdin,



On Thu, Dec 22, 2011 at 4:33 PM, Thomas Charron <twaffle at gmail.com> wrote:
> 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



-- 
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



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org