I found the following behaviour on a Synology RS814+
> ssh backup01 rsync
Permission denied, please try again.
> ssh backup01 'which rsync'
/usr/bin/rsync
> ssh backup01 'echo $PATH'
/usr/bin:/bin:/usr/sbin:/sbin
> ssh backup01 '/usr/bin/rsync'
[... rsync version and usage information ...]
Who can explain why the first and the last command don't do the same thing?
which
doesn't show aliases (on all shells). Trytype rsync
. That usually is a shell built-in.