Today I Learned

hashrocket A Hashrocket project

Use rsync with a custom port

You can rsync over a custom port for cases when you have custom ssh tunnels setup using rsync's -e flag. The -e flag tells rsync to use a specific shell, in this case it's still ssh, but with the addition of the -p flag.

Setup a custom tunnel

ssh -N -L 2222: user@remote-machine

Use rsync over the custom tunnel

rsync -avz -e 'ssh -p 2222' localhost:/files /myfiles

See More #devops TILs