How to Fix “-bash: scp: command not found”

Question :

I try to use SCP command on my CentOS 6.3 server, but the following error returned. According to wikipedia, SCP or Secure copy is a means of securely transferring computer files between a local host and a remote host or between two remote hosts and It’s based on the Secure Shell (SSH) protocol. The term SCP can refer to one of two related things, the SCP protocol or the SCP program.

[root@CentOS6.3 ~]# scp
-bash: scp: command not found

Answer :
To fix above error, you have to install openshh-clients in your CentOS 6.3 server as below :

[root@CentOS6.3 ~]# yum install openssh-clients -y

Just type scp command to get more options of the command :

[root@CentOS6.3 ~]# scp
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2
[root@CentOS6.3 ~]#
Leave a Reply

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

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee