I want to use file transfer via SSH on some scripts. I've read it's possible to tar over ssh. Where should I start reading?
To do file transfer over ssh you can
- use scp
scp -r /srcdir/ user@remotehost:/destdir/
- use rsync over ssh (see the -e parameter)
rsync -e ssh -a /srcdir/ user@remotehost:/destdir/
- use some tool that transfers data via stdin/out (tar, cpio, etc)
cd /sourcedir; tar -c . | ssh username@remotehost bash 'cd /dstdir; tar -x
- Mount the filesystem via sshfs (if fuse is supported on your system)
Im no expert, but I think http://en.wikipedia.org/wiki/Secure_copy is what you want.