Created
March 14, 2015 04:06
-
-
Save jclosure/20d5444aedea3d7416f3 to your computer and use it in GitHub Desktop.
1 liner shell command that tars a directory, pipes it through 2 ssh connections, and untars it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/sshpass -p mypass ssh [email protected] -o UserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no 'tar zcf - ./scratch/in' | \ | |
/usr/bin/sshpass -p mypass ssh [email protected] -o UserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no 'tar xzf - -C ./scratch/out' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment