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

Re: scp from stdin



On Tue, Nov 28, 2000 at 04:10:17PM -0600, Brian McGroarty wrote:
> 
> Is there a way to pipe input to a file on a remote host via scp?
> 
> i.e.
> 
> tar cz ~user | scp ??? user@remotehost.com:outfile.tgz

I think not directly, but you could try:

$ tar cz ~user | ssh user@remotehost.com 'umask 077 && cat >outfile.tgz'

ofcourse umask is futile if the file allready exists:(

-- 
groetjes, carel



Reply to: