mediatribe.net -- Drupal and Web Development

Notice: this post was last updated 3 years 33 weeks ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

scp and rsync: command not found with remote Centos 6

I was trying to scp and rsync from a Mac into a brand-new CentOS VM, and was getting this error, even after installing rsync and scp on my remote machine with yum install openssh-clients and yum install rsync:

scp root@example.com:~/whatever.txt ~/
scp: command not found

Same problem with rsync.

It turns out scp and rsync are expected to be on the remote machine at /usr/sbin but are at /usr/bin by default.

Creating symlinks on the remote machine worked for me:

ln -s /usr/bin/scp /usr/sbin/scp
ln -s /usr/bin/rsync /usr/sbin/rsync

For the difference between sbin and bin, see here.

Hallowed be your name!!! This

Hallowed be your name!!! This solve my problem!