加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

unix – ssh-copy-id未找到标识错误

发布时间:2020-12-15 09:20:31 所属栏目:安全 来源:网络整理
导读:我有几个客户端系统,我需要推送ssh密钥和登录从我的服务器没有身份验证提示。 首先,在服务器上,我创建了ssh键如下所示是成功的 ]# ssh-keygen -t rsa -N "" -f my.key 第二,尝试复制pub键,但失败,没有身份错误。我在这里做错了一步? ]# ssh-copy-id m
我有几个客户端系统,我需要推送ssh密钥和登录从我的服务器没有身份验证提示。

首先,在服务器上,我创建了ssh键如下所示是成功的

]# ssh-keygen -t rsa -N "" -f my.key

第二,尝试复制pub键,但失败,没有身份错误。我在这里做错了一步?

]# ssh-copy-id my.key.pub 10.10.1.1
/usr/bin/ssh-copy-id: ERROR: No identities found
您需要使用-i标志:
ssh-copy-id -i my.key.pub 10.10.1.1

从man page:

If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used,regardless of whether there are any keys in your ssh-agent. Otherwise,if this: ssh-add -L provides any output,it uses that in preference to the identity file

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读