scp登录The authenticity of host 192.168.0.xxx can't be established. 的问题

scp 1.txt root@192.168.1.25:/tmp
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

 

然后

在一,在linux100主机里的用户
运行
#ssh-keygen -t rsa

结果如下

QUOTE:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/.username/ssh/id_rsa):#回车
Enter passphrase (empty for no passphrase):#回车
Enter same passphrase again:#回车
Your identification has been saved in /home/.username /.ssh/id_rsa.
Your public key has been saved in /home/.username /.ssh/id_rsa.pub.
The key fingerprint is:
38:25:c1:4d:5d:d3:89:bb:46:67:bf:52:af:c3:17:0c username@localhost
Generating RSA keys:
Key generation complete.

会在用户目录~/.ssh/产生两个文件,id_rsa,id_rsa.pub
二,把linux100主机上的id_rsa.pub文件拷贝到linux200主机的root用户主目录下的.ssh目录下,并且改名为authorized_keys
即:
/root/.ssh/authorized_keys

如果已经有authorized_keys这个文件,将id_rsa.pub的内容拷贝到 authorized_keys文件中。cat  id_rsa.pub >> authorized_keys 便可以。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值