scp 1.txt
The authenticity of host '192.168.1.25 (192.168.1.25)' can't be established.
RSA key fingerprint is 6c:28:23:df:45:d5:c8:79:4d:9e:ed:f6:f2:73:22:4c.
Are you sure you want to continue connecting (yes/no)?
提示输入yes后,屏幕不断出现y,只有按ctrl + c结束
错误是:The authenticity of host 192.168.1.xxx can't be established.
执行ssh -o StrictHostKeyChecking=no 192.168.1.xxx 就OK
[oracle@rac1 .ssh]$ scp authorized_keys rac2:/home/oracle/.ssh/keys
The authenticity of host 'rac2 (192.168.0.102)' can't be established.
RSA key fingerprint is 01:4c:26:d4:e8:0e:79:a2:cb:6f:2b:5e:da:3a:79:d3.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': y
Please type 'yes' or 'no': n
Please type 'yes' or 'no': n
Please type 'yes' or 'no': y
Please type 'yes' or 'no': y
Please type 'yes' or 'no':
Host key verification failed.
lost connection
上面的问题老的出现,或者我用ssh 192.168.0.101 也是同样不能建立连接。但是通过ssh -o StrictHostKeyChecking=no 192.168.0.101是可以的,我用scp authorized_keys rac2:/home/oracle/.ssh/keys 一直是不能建立连接,不能 出现输入密码。后来修改配置文件就可以了。
用命令 ssh -l username hostname
Are you sure you want to continue connecting (yes/no)?
1、这个是ssh安全认证是的一个RSA认证。此处必须选择yes才能连接。
第一次yes后,他会询问你是否永久把这个RSA认证加入本地,选择yes后,以后不会再出现提醒。
每次登陆只需要输入密码即可。
2、也可以不用输入1中的yes,但是需要修改本机配置。======此种方法测试后管用
/etc/ssh/ssh_config 中的
# StrictHostKeyChecking ask 改成
StrictHostKeyChecking no
这样多此一举的询问就不在了。
1).首先以Oracle身份在每个节点上执行
su - oracle
chmod 700 .ssh
cd .ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
2)把所以节点authorized_keys文件合成一个,在用这个文件覆盖各种节点.ssh下的同名文件
rac1:
cat *.pub > authorized_keys
scp authorized_keys rac2:/home/oracle/.ssh/keys
rac2:
cat *.pub > authorized_keys
cat keys >> authorized_keys
scp authorized_keys rac1:/home/oracle/.ssh/
3)测试
ssh rac1 date
ssh rac2 date
注意:一定要确认oracle的用户名和密码是正解的
阅读(2423) | 评论(0) | 转发(0) |