Page 1 of 1

catssh - copy files over ssh

Posted: Thu Jul 09, 2015 3:14 pm
by ChefIronBelly
Instead of scp for copying files over ssh.

Code: Select all

#!/bin/sh
# catssh (chef 2015)
# requires: ssh
# usage: catssh $FILE $NAME@SERVER /$PATH/ 
# example:  kill.la.kill.s01e20.mp4 | ssh [email protected] cat ">" /storage/tvshows/

cat $1 | ssh $2 cat ">" $3$1 2>/dev/null
echo "copy" $1 ">" $2 "complete"

Re: catsshit - copy files over ssh

Posted: Fri Jul 10, 2015 3:39 am
by doubledutch
Not quite productionable but better than scp for my uses, surely. If people weren't like wtf I'd put this on every server.

Re: catssh - copy files over ssh

Posted: Sun Jan 03, 2016 7:31 am
by Snap
Thanks, chef. Nice one.

Re: catssh - copy files over ssh

Posted: Sun Jan 03, 2016 12:09 pm
by wuxmedia
cool, simple. :)