Error while attempting to rsync files between environments | Acquia Product Documentation
Cloud Platform
Error while attempting to rsync files between environments
Error while attempting to rsync files between environments
Date Published: February 5, 2025
Issue
When using SSH with agent forwarding and rsync to copy files from one environment to another and receiving public key authentication error on server.
Error:
...
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
Resolution
This won't be possible if you SSH on to one of the environments. You can't do environment-to-environment directly, but you can perform the action locally using agent forwarding and rsync, not while remotely logged in via SSH.