当前位置:网站首页>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命令是否在本地主机账号权限下执行,还是登录进服务器账号下执行,应该是在本机主机下执行,如果是登录进服务器账号之后执行会该报错。
边栏推荐
- 旷世轻量化网络ShuffulNetV2学习笔记
- RocketQA:通过跨批次负采样(cross-batch negatives)、去噪的强负例采样(denoised hard negative sampling)与数据增强(data augment
- JS anti shake and throttling
- SWT/ANR问题--StorageManagerService卡住
- (summary I) Halcon Foundation's target finding features + becoming a regular
- Alphabet-Rearrange-Inator 3000(字典树自定义排序)
- Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]
- 记一次服务部署失败问题排查
- 项目管理是什么?
- SWT/ANR问题--AMS/WMS
猜你喜欢

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

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

RestCloud ETL WebService数据同步到本地

How to realize the scene linkage of intelligent lock, lamp and intelligent curtain motor in zhiting?

联想X86服务器重启管理控制器(XClarity Controller)或TSM的方法

Applet custom top navigation bar, uni app wechat applet custom top navigation bar

Pycharm 打开远程目录 Remote Host

Nacos configuration center tutorial

Visual effects, picture to cartoon function

A preliminary understanding of operator overloading
随机推荐
Cluster method synchronous execution framework suona
SWT / anr problem - storagemanagerservice stuck
The image variables in the Halcon variable window are not displayed, and it is useless to restart the software and the computer
[multi source BFS] 934 Shortest Bridge
centos 安装多个版本的php并切换
Visual effects, picture to cartoon function
鼠标悬停效果八
SWT/ANR问题--AMS/WMS
Proxy support and SNI routing of pulsar
Evaluation of the entry-level models of 5 mainstream smart speakers: apple, Xiaomi, Huawei, tmall, Xiaodu, who is better?
@ConfigurationProperties和@Value的区别
In the industrial Internet, "small" programs have "big" effects
Contrastive learning of Class-agnostic Activation Map for Weakly Supervised Object Localization and
手机上怎么开户?还有,在线开户安全么?
在国内如何买港股的股?用什么平台安全一些?
nacos配置中心使用教程
kubernetes资源对象介绍及常用命令(二)
Pulsar geo replication/ disaster recovery / regional replication
Alphabet rearrange inator 3000 (dictionary tree custom sorting)
详解数据治理知识体系