I am copying files via rsync between two linux servers, the command I am using is:
rsync -Cravzpt --remove-source-files --exclude 'script.sh' --exclude 'index.php' /var/www/html/bkpserver/tarefario [email protected]:/var/www/html/
But when I run this command, it asks for the root password and after a few seconds, it displays the following error:
ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]
I have no idea why you are having this error, because I have exactly the same command on 3 different servers and copying to the same destination server and they all work.