Last active
June 22, 2023 11:51
-
-
Save fanurs/b6b2ba9bbccfd3f949d68bc82cbe2d9a to your computer and use it in GitHub Desktop.
Transferring files using scp
This file contains hidden or 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
#!/bin/bash | |
############################# | |
# from "here" to "there" | |
############################# | |
scp source_files user@destination:/path/at/the/destination | |
# with jumphost | |
scp -o 'ProxyCommand ssh user@jumphost -W %h:%p' source_files user@destination:/path/at/the/destination | |
############################# | |
# from "there" to "here" | |
############################# | |
scp user@source:/path/at/the/source/files destination | |
# with jumphost | |
scp -o 'ProxyCommand ssh user@jumphost -W %h:%p' user@source:/path/at/the/source/files destination |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment