- How to Setup Bind Chroot DNS Server on CentOS 7.0 VPS
- How to Running Varnish 3.0 in Front of Nginx, PHP5.4 (PHP-FPM)
- How to Configure Static IP Address on RHEL 7.0/CentOS 7.0
- How to Install ifconfig and netstat on RHEL 7.0/CentOS 7.0
- How to Upgrade Zimbra Collaboration Suite 8.0.7 to 8.5.0 on CentOS 6.5 x86_64
I get the following error when i try to use scp command on linux CentOS server. scp command is usually used to copy files and directories securely between remote hosts without starting an FTP session or logging into the remote systems explicitly. The scp command uses SSH to transfer data, so it requires a password or passphrase for authentication.
-bash: scp: command not found
Above issue is related with openshh. There are two openssh packages that normally in the linux server which are openssh-server and openssh-clients. Kindly perform telnet command to check whether openssh server has been installed or not.
[root@centos62 ~]# telnet localhost 22 Trying ::1... Connected to localhost. Escape character is '^]'. SSH-2.0-OpenSSH_5.3
Above telnet command shows that openssh-server has been installed. Therefore, the problem on “scp: command not found” is due to openssh-clients not installed.
Verify the installed package :
[root@centos62 ~]# rpm -qa | grep openssh-* openssh-server-5.3p1-70.el6.i686 openssh-5.3p1-70.el6.i686
To install openssh-clients, execute the following command :
[root@centos62 ~]# yum install openssh-clients -y
Then try to run scp command :
[root@centos62 ~]# 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
If you return the scp usage as above, that’s mean openssh-clients has been installed successfully.Sign up for the WP Engine affiliate program and receive a minimum of $150 per referral! As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. Jumping through archives page to read more articles..