Piping data over SSH

Date June 6, 2006 by Isaac

It is sometimes useful to pipe binary data over a ssh connection. I use this sometimes when I want to back up the data on a machine over the network without creating a backup file first.

 
tar -cf - dir_to_backup | ssh user@hostname 'cat > backup.tar'

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>