|
|
A detailed walkthrough on creating backups using rsync
Since you can use ssh under (over ?) rsync I was wondering how you can use rsync where both of the host are behind a firewall (ie : you need to connect to a firewall before connecting to the host)
A detailed walkthrough on creating backups using rsync
Since you can use ssh under (over ?) rsync I was wondering how you can use rsync where both of the host are behind a firewall (ie : you need to connect to a firewall before connecting to the host) To connect between two hosts separated by firewalls, you can use an SSH tunnel. For example, if host_A is living behind firewall_A, and host_B is living behind firewall_B, and you need to rsync from A to B, you can do something like the following (from host_A): ssh -g -N -L 7777:host_B:22 user@firewall_B
This maps your local (host_A) port 7777 to host_B's port 22 (ssh) within firewall_B. Note that '7777' can be any unused, unprivileged port, and 'host_B' is any hostname meaningful within firewall_B, including internal IP's in the 192.168.0.0 range. Test this connection by connecting to host_B: ssh -p 7777 user@localhost
...that should get you into host_B, even though it looks like you're connecting to localhost. Now modify your rsync command to use the same: rsync -e "ssh -p 7777" local_dir/ user@localhost:remote_dir/
There are a number of caveats and shortcuts involving conflicting entries for localhost in |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|