[root@http ~]# scp /etc/hosts 10.0.0.129:/optbash:scp: command not found
[root@http ~]# which scp
/usr/bin/which: no scp in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
2.使用命令查看scp属于哪一个安装包
[root@http ~]# yum provides */scp
Loaded plugins: fastestmirror
Repository base is listed more than once inthe configuration
Repository updates is listed more than once inthe configuration
Repository extras is listed more than once inthe configuration
Repository centosplus is listed more than once inthe configuration
Repository contrib is listed more than once inthe configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
openssh-clients-5.3p1-123.el6_9.x86_64 : An open source SSH client applications
Repo : base
Matched from:
Filename : /usr/bin/scp
3.安装scp命令
[root@http ~]# yum install openssh-clients -y
4.测试
[root@http ~]# scp /etc/hosts 10.0.0.129:/opt
The authenticity of host '10.0.0.129 (10.0.0.129)' can't be established.
RSA key fingerprint is3a:b6:fd:7c:a0:cf:52:be:3e:5a:4a:ec:9a:60:8a:84.
Are you sure you want tocontinue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.129' (RSA) to the list of known hosts.
root@10.0.0.129's password:
hosts 100% 1580.2KB/s 00:00