SCP 报如下错误:
[root@node1 home]# scp -r root@10.42.28.85:/home/yw_bak ./
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:MJQiGQwCxl0kK12rkvaoQHuzf9ef5Nek/FYEL7wheUg.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:5
ECDSA host key for 10.42.28.85 has changed and you have requested strict checking.
Host key verification failed.
解决方法:
cd ~
cd .ssh
ssh-keygen -R xx.xx.xx.xx
scp传输提示bash: scp: command not found
其中一端缺少scp相关的包
源
[oracle@rac1 dump_dir]$ scp /mnt/dump_dir/expdp_orders_2tabs2* 192.168.X.247:/home/oracle/dump_dir
oracle@192.168.X.247's password:
bash: scp: command not found
目标
[root@localhost ~]# -bash: scp: command not found
-bash: -bash:: command not found
[root@localhost ~]# yum install openssh-clients
CentOS出现连接被拒--ssh:connect to host centos-py port 22: Connection refused
问题原因:
我在配置ssh免登录时候出现该问题,其错误原因主要有以下几种:
1)SSH服务未安装
此时,采用在线安装的方式就行下载安装。
命令为: yum -y install openssh-server;
然后启动ssh服务: service sshd start。
2)ssh服务对应22号端口未开启
ss -lnt :使用该命令查询22号端口是否开启,如果为下图所示为正常开启,
否则要先开启22号端口。