The first time you need to create keys in the private server and share the keys in your office server. You can do it as below.
In your private server, perform the following steps.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Note: When it asks you to enter the passphrase just press enter key, and do not give any password here.
ssh-copy-id, to copy the public key to the remote host.
ssh-copy-id -i ~/.ssh/id_rsa.pub office-server
rsync -rvz -e 'ssh -p 873' --progress --remove-sent-files /private_server
If you just run the
rsync command without copying the keys, it will ask for the password. To stop it from asking for password, you have to share the keys of your private server in the office server so that you can send files using
rsync and port
873 without the need of password.