Linux – install scp command on CentOS 6.5

Connect with

install scp on centos 7This post is about how to install scp on centOS 7 Linux. scp command is used to copy files/folders from one Linux/UNIX server to another Linux/UNIX server.

Overview of Install scp on centos 7

There are different ways to copy from one server of *nix to another server of *nix (Linux, Unix).
In this post, I am going to explain you, how to install scp command on CentOS 7 or 6.5. First of all, I want to tell you, what is scp command? This is basically used to secure copy (remote files/folder copy program) from one Linux/Unix server to another Linux/Unix server in the network.

If no scp command install in your server/machine, where you are trying to execute scp command, then you will get the following error.

[root@localhost ~]# scp -r mysfotkey@10.0.8.7:/opt/mongod/mongokey /opt/mongod/
-bash: scp: command not found

In order to install scp remote copy utility , execute the command yum install openssh-clients and you are ready to copy files or folder.

[root@localhost ~]# yum install openssh-clients
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
 * base: centos.excellmedia.net
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package openssh-clients.x86_64 0:5.3p1-123.el6_9 will be installed
--> Processing Dependency: openssh = 5.3p1-123.el6_9 for package: openssh-clients-5.3p1-123.el6_9.x86_64
--> Processing Dependency: libedit.so.0()(64bit) for package: openssh-clients-5.3p1-123.el6_9.x86_64
--> Running transaction check
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package openssh.x86_64 0:5.3p1-111.el6 will be updated
--> Processing Dependency: openssh = 5.3p1-111.el6 for package: openssh-server-5.3p1-111.el6.x86_64
---> Package openssh.x86_64 0:5.3p1-123.el6_9 will be an update
--> Running transaction check
---> Package openssh-server.x86_64 0:5.3p1-111.el6 will be updated
---> Package openssh-server.x86_64 0:5.3p1-123.el6_9 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                       Arch                 Version                                 Repository             Size
========================================================================================================================
Installing:
 openssh-clients               x86_64               5.3p1-123.el6_9                         updates               444 k
Installing for dependencies:
 libedit                       x86_64               2.11-4.20080712cvs.1.el6                base                   74 k
Updating for dependencies:
 openssh                       x86_64               5.3p1-123.el6_9                         updates               277 k
 openssh-server                x86_64               5.3p1-123.el6_9                         updates               329 k

Transaction Summary
========================================================================================================================
Install       2 Package(s)
Upgrade       2 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm                                               |  74 kB     00:00
(2/4): openssh-5.3p1-123.el6_9.x86_64.rpm                                                        | 277 kB     00:00
(3/4): openssh-clients-5.3p1-123.el6_9.x86_64.rpm                                                | 444 kB     00:00
(4/4): openssh-server-5.3p1-123.el6_9.x86_64.rpm                                                 | 329 kB     00:00
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   792 kB/s | 1.1 MB     00:01
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) 
 Package: centos-release-6-7.el6.centos.12.3.x86_64 (@anaconda-CentOS-201508042137.x86_64/6.7)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : openssh-5.3p1-123.el6_9.x86_64                                                                       1/6
  Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64                                                              2/6
  Installing : openssh-clients-5.3p1-123.el6_9.x86_64                                                               3/6
  Updating   : openssh-server-5.3p1-123.el6_9.x86_64                                                                4/6
  Cleanup    : openssh-server-5.3p1-111.el6.x86_64                                                                  5/6
  Cleanup    : openssh-5.3p1-111.el6.x86_64                                                                         6/6
  Verifying  : openssh-clients-5.3p1-123.el6_9.x86_64                                                               1/6
  Verifying  : libedit-2.11-4.20080712cvs.1.el6.x86_64                                                              2/6
  Verifying  : openssh-5.3p1-123.el6_9.x86_64                                                                       3/6
  Verifying  : openssh-server-5.3p1-123.el6_9.x86_64                                                                4/6
  Verifying  : openssh-5.3p1-111.el6.x86_64                                                                         5/6
  Verifying  : openssh-server-5.3p1-111.el6.x86_64                                                                  6/6

Installed:
  openssh-clients.x86_64 0:5.3p1-123.el6_9

Dependency Installed:
  libedit.x86_64 0:2.11-4.20080712cvs.1.el6

Dependency Updated:
  openssh.x86_64 0:5.3p1-123.el6_9                        openssh-server.x86_64 0:5.3p1-123.el6_9

Complete!
[root@localhost ~]#

Test the scp installation by running scp command on linux/unix terminal

[root@localhost ~]# 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

Your comments are welcome to improve this post. Happy Learning! 🙂 about how you install scp on centos 7.


Connect with

Leave a Comment

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