当前位置:网站首页>ssh配置免密登录时报错:/usr/bin/ssh-copy-id: ERROR: No identities found 解决方法
ssh配置免密登录时报错:/usr/bin/ssh-copy-id: ERROR: No identities found 解决方法
2022-07-01 02:33:00 【说c语言的小岳岳】
一、ssh免密登录:
1.创建密钥:
ssh-keygen
然后一直回车即可。
执行结束后,~/.ssh/目录下会多两个文件:
id_rsa:私钥
id_rsa.pub:公钥
2.给服务器添加公钥:
之后想免密码登录哪个服务器,就将公钥传给哪个服务器即可。
方式一:
例如,想免密登录myserver服务器。则将公钥中的内容,复制到myserver中的~/.ssh/authorized_keys文件里即可。
方式二:
也可以使用如下命令一键添加公钥:
ssh-copy-id myserver
二、注意:
当你使用方式二ssh-copy-id myserver命令给服务器添加公钥时,如果出现下面错误,
/usr/bin/ssh-copy-id: ERROR: No identities found
检查你的ssh-copy-id命令是否在本地主机账号权限下执行,还是登录进服务器账号下执行,应该是在本机主机下执行,如果是登录进服务器账号之后执行会该报错。
边栏推荐
- 股票开户安全吗?上海股票开户步骤。
- SWT/ANR问题--StorageManagerService卡住
- nacos配置中心使用教程
- [multi source BFS] 934 Shortest Bridge
- Leetcode (524) -- match the longest word in the dictionary by deleting letters
- Pytorch —— 基礎指北_貳 高中生都能看懂的[反向傳播和梯度下降]
- Nacos configuration center tutorial
- robots.txt限制搜索引擎收录
- 我的PMP学习考试心得
- How do the top ten securities firms open accounts? Also, is it safe to open an account online?
猜你喜欢

我的PMP学习考试心得

Detailed data governance knowledge system

5款主流智能音箱入门款测评:苹果小米华为天猫小度,谁的表现更胜一筹?

SWT/ANR问题--Binder Stuck

Pulsar geo replication/ disaster recovery / regional replication

Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"

kubernetes资源对象介绍及常用命令(二)

(总结一)Halcon基础之寻找目标特征+转正

如何在智汀中實現智能鎖與燈、智能窗簾電機場景聯動?

RestCloud ETL WebService数据同步到本地
随机推荐
import tensorflow.contrib.slim as slim报错
JS anti shake and throttling
产业互联网中,「小」程序有「大」作为
鼠标悬停效果一
pycharm 软件deployment 灰色 无法点
【PR #5 A】双向奔赴(状压DP)
Leetcode interview question 17.10 Main elements
Image preloading in JS
PMP是什麼?
How to use Jieba participle in unity
如果我在北京,到哪里开户比较好?另外,手机开户安全么?
LabVIEW calculates the camera image sensor resolution and lens focal length
How do I open an account on my mobile phone? Also, is it safe to open an account online?
Nacos configuration center tutorial
Focusing on green and low carbon, data center cooling has entered a new era of "intelligent cooling"
SWT/ANR问题--Binder Stuck
Machine learning 9-universal approximator radial basis function neural network, examining PDA and SVM from a new perspective
Xception学习笔记
项目管理是什么?
AI edge computing platform - beaglebone AI 64 introduction