“bash: scp: command not found” despite it exists



If You receive the error something like, despite the scp exist:

nsc-book:~ nsc$ scp root@loginroot.com:/root/filename ~/filename
bash: scp: command not found
nsc-book:~ nsc$ which scp

It may look silly, but please check if the destination server has that package too ;)
I haven’t expected a CentOS server not having this simple package by default.

Anyway, on CentOS it’s in openssh-clients package, and may be installed with command:

yum install openssh-clients

Of if it exists there too, please check the PATH variable on the remote system, if it shosw the correct ipaths. Also, You may check .bashrc on remote user if it tries to overwrite the PATH value.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.