Fast, encrypted file copy

Tue, 17 Feb. 2009     Thomas Bendler     ~ 1 min to read

From time to time I need to copy files between UNIX boxes without having NFS, SMB, whatever in place. This can be done easily with SSH, TAR and if available BUFFER. The command you need is:

> tar cvf - source-dir/ \
  | buffer \
  | ssh -e none -c blowfish user@remote.host.tld "cd /dest-dir && buffer \
  |  tar xvf -"

If BUFFER is not installed, simply remove it and use instead:

> tar cvf - source-dir/ \
  | ssh -e none -c blowfish user@remote.host.tld "cd /dest-dir \
  |  tar xvf -"


Share on: