I've got rsync installed on my two machines on the same local network. I'm trying to sync the /var/www/html/ folder between the two of them.
I've created a user on Machine A called "rsync"
And then I'm running this command on Machine B:
rsync --rsh=rsh [email protected]:/var/www/html/ /var/www/html/
...and getting this error:
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.2]
Why am I getting a "publickkey" related error when my command is asking to use rsh instead of ssh? Since it's an internal network with no risk of eavesdropping, I wanted to use rsh to simplify things.
Can anyone tell me what step I'm missing to get this working properly?
(A few extra notes: I know I'll need other rsync flags but I've started with this to start. Also I've tried [email protected] and got the error I was expecting with that. So I know it's at least trying to connect to the right place.)