
#Rsync over ssh tunnel password
*/15 * * * * rsync -avzP -progress /transfer/share/ might wish to further secure this by locking down access via a "service account" (AKA: ProdID) with limited access.Īlternately you could use a SSH key to get around a password prompt at login. A -> B (manually initiated, or could also be done via crontab on nodeA) rsync -avzP -progress /path/to/transfer/ -> C (create a crontab to run every 15 mins) sudo crontab -e One solution would be a crontab on your "jump node" (Computer B in this scenario). Additionally, you can add more options in the part inside the quotes, such as keys or files, etc.** The syntax for the command is: ssh -f -N -L local_port_machineA:ip_machineC:remoteport_machineC my case, remoteport_machineC shoul be port 22, because I want to rsync directories through ssh.Īfter that, we can execute the rsync command from the machine A, in this way: rsync -avz -e "ssh -p local_port" /source_directory all. **UPDATE: I dit it!! I created an ssh tunnel with local port forwarding, which means that I used a local port from the machine A to connect with a remote port on the machine C through the machine B. I'm thinking on a ssh tunnel, but I don't know if I have to make a local port forwarding or a remote port forwarding, or if I have to make two tunnels: one from A to B and other from B to C?Īny suggestions? I'd be really grateful. I want to use rsync in a simple way, like this: rsync -options /path_to_local IpComputerC:/path_to_remote So, I want to rsync directories from computer A to computer C, using computer B(since only computer B has access via ssh to computer C). Computer A doesn't have access to computer C directly.Only computer B has access via ssh to computer C.Computer A has access via ssh to computer B.


I have 3 computers/servers, let's call them as computer A, computer B and computer C.
