-- Drupal and Web Development

Notice: this post was last updated 3 years 30 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 ~/
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!

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.