rsync via ssh Problem

Hi all,
recently I took over the admin-task for a solaris 10 x86 machine.

I would like to use rsync for backing up files via ssh to another machine. There are two machines I have tested with both without success. One is a ubuntu server 8.04, the other one is ubuntu 10.04 desktop.

Installed rsync from sunfreeware.com and also the dependencies. Tested locally, works fine. Two directories on the solaris machine are synced just fine.

When I try to backup to one of the other machines I get an error:

bash: /usr/local/bin/rsync: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]

I can connect to the other machines from the solaris machine via ssh, so I am assuming ssh is not the problem.

Syncing between just the other two machines also works fine via ssh.

Any ideas what could be the problem?

---------- Post updated at 08:05 AM ---------- Previous update was at 07:58 AM ----------

Ok, problem solved. rsync needs to be in the same directory on both machines.

solaris was /usr/local/bin
while ubuntu is /usr/bin/

seems to work now

The rsync binary has to be available on all machines. SSH is only used for data transport, which the two running rsync programs (one local, one remote) use to communicate.

it was available/present on all machines, even the same version. But apparently it also needs to be in the exact same path/location on the machines. Being in th user's path does not seem to be enough.

---------- Post updated at 08:24 AM ---------- Previous update was at 08:18 AM ----------

Ok, BUT:

Only syncing from the solaris machine to a ubuntu machine works now. Meaning: If I issue the command when I am on the solaris machine it works.

When I am on the ubuntu machine I get an error:
-----
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(454) [sender=2.6.9]
-----

Could this be because somehow bash or something is loaded when I log in to the solaris machine which sets the PATH. But when issuing the rsync request the Path is not set, because I am not logged in?

Anyone know what I mean?