Skip to content

Instantly share code, notes, and snippets.

@fzlaziz
Created October 29, 2025 03:52
Show Gist options
  • Select an option

  • Save fzlaziz/577f9d44d754fb71fbc57561dfd081ab to your computer and use it in GitHub Desktop.

Select an option

Save fzlaziz/577f9d44d754fb71fbc57561dfd081ab to your computer and use it in GitHub Desktop.
Using rsync to copy data from a private machine that has no public IP, by tunneling through another machine on the same network that does have a public IP. (in this case, public ip port is 2202)
rsync -avz --partial --progress \
-e "ssh -o 'ProxyCommand ssh -p 2202 -W %h:%p root@machine_with_public_ip'" \
root@machine_with_private_local_ip:/root/app/ ~/backup/machine_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment