Transfer files via SSH

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)

O'Reilly has a book with it all - SSH, The Secure Shell: The Definitive Guide - if you Google for it, there are many references, places to buy it, and view it online.