catssh - copy files over ssh

Submitted scripts and programs
Forum rules
Your own work only.
User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

catssh - copy files over ssh

Unread post by ChefIronBelly » Thu Jul 09, 2015 3:14 pm

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"
Last edited by ChefIronBelly on Fri Jul 10, 2015 5:29 pm, edited 2 times in total.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
doubledutch
killall X
Posts: 163
Joined: Sun Aug 10, 2014 1:25 pm

Re: catsshit - copy files over ssh

Unread post by doubledutch » Fri Jul 10, 2015 3:39 am

Not quite productionable but better than scp for my uses, surely. If people weren't like wtf I'd put this on every server.

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: catssh - copy files over ssh

Unread post by Snap » Sun Jan 03, 2016 7:31 am

Thanks, chef. Nice one.

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: catssh - copy files over ssh

Unread post by wuxmedia » Sun Jan 03, 2016 12:09 pm

cool, simple. :)
"Seek, and Ye shall find"
"Github | Chooons | Site"

Post Reply