首页 > 其他 > 详细

ssh-copy-id报错

时间:2021-04-25 18:54:25      阅读:22      评论:0      收藏:0      [点我收藏+]
错误
[root@jenkins .ssh]# ssh-copy-id -i id_rsa_driver.pub root@192.168.0.96
The authenticity of host ‘192.168.0.96 (192.168.0.96)‘ can‘t be established.
RSA key fingerprint is a7:78:59:bd:6b:a5:02:3c:6e:85:9a:4c:7b:08:77:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.0.96‘ (RSA) to the list of known hosts.
Permission denied (publickey,password).

解决办法

采用多对公钥私钥时,由于操作顺序不当常会出现此问题,正确操作步骤如下:

  • ssh-copy-id -i id_rsa_driver.pub root@192.168.0.96
  • 修改config配置文件内容如下:
    Host 192.168.0.96
    HostName 192.168.0.96
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa_driver
    user root

ssh-copy-id报错

原文:https://blog.51cto.com/u_14843781/2731702

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!