Use Rsync over ssh

Written on 04 August 2016

  1. Local host to server
rsync -v -e ssh localost/path/file [email protected]:/path/in/server  
  1. server to localhost
rsync -v -e ssh [email protected]:/path/in/server/file  

Simple usage:
Config ssh conection use ~/.ssh/config

Host server1  
HostName server1ip  
Compression yes  
IdentityFile ~/.ssh/private_key  
User user  

So command rsync ssh can be simple as

rsync -v -e ssh server1:/server/path/file   local/path/  
Read more on ssh rsync command tips