Software⏱️ 4 min read📅 2026-06-11

How to Fix: rsync error did not see server greeting

rsync error fix

Quick Answer: Check the rsync.conf file on the server side for any syntax errors or incorrect settings, and ensure that the SSH connection is properly configured.

The error 'rsync error: syntax or usage error (code 1) at clientserver.c(1223 [Receiver=3.2.3]' indicates that there is an issue with the rsync protocol data stream, causing the connection to be unexpectedly closed. This error affects users who are trying to upload files using rsync over SSH.

This error can be frustrating for users because it prevents them from completing their file transfer tasks. Fortunately, resolving this issue is relatively straightforward and can be achieved by following a few simple steps.

🔍 Why This Happens

  • The primary reason for this error is that the server greeting is missing in the rsync configuration. The rsync protocol requires a greeting message to establish the connection between the client and server. In this case, the server greeting is not present in the /root/.ssh/rsync.conf file.
  • Another possible cause is that the 'use chroot' option is set to false in the /root/.ssh/rsync.conf file. This option can affect the way rsync handles the connection, leading to errors like this one.

🚀 How to Resolve This Issue

Verify and update server greeting

  1. Step 1: Open the /root/.ssh/rsync.conf file in a text editor and add the following line at the end of the file: 'greeting = yes'. This will enable the server greeting, which is required for rsync to establish the connection.
  2. Step 2: Save the changes to the file and restart the SSH service to apply the new configuration. You can do this by running the command '/usr/sbin/service sshd restart' or '/etc/init.d/ssh restart', depending on your system's configuration.
  3. Step 3: Test the rsync connection again using the same command that was originally used, and verify that the error is resolved.

Disable 'use chroot' option

  1. Step 1: Open the /root/.ssh/rsync.conf file in a text editor and set the 'use chroot' option to 'true'. This will enable chrooting, which can help resolve issues like this one.
  2. Step 2: Save the changes to the file and restart the SSH service to apply the new configuration. You can do this by running the command '/usr/sbin/service sshd restart' or '/etc/init.d/ssh restart', depending on your system's configuration.
  3. Step 3: Test the rsync connection again using the same command that was originally used, and verify that the error is resolved.

🎯 Final Words

To resolve the 'rsync error: syntax or usage error (code 1)' issue, you can try one of two methods. First, verify and update the server greeting by adding the 'greeting = yes' line to the /root/.ssh/rsync.conf file and restarting the SSH service. Alternatively, disable the 'use chroot' option by setting it to 'true' in the same file and restarting the SSH service. Either of these methods should resolve the error and allow you to complete your file transfer tasks successfully.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions