Linux-主机之间创建免密
一、四台主机进行免密
192.168.10.6
192.168.10.11
192.168.10.12
192.168.10.13
二、192.168.10.6主机生成密钥对,并将公钥传输到其它所有主机。
root@k8s-master01:~# ssh-keygen -t rsa -P ''
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:BkqF1ysQP9COkjGM3LEDoYP+akQaK8Zuef7VcmTnOR0 root@k8s-master01
The key's randomart image is:
+---[RSA 3072]----+
|.=o.++.. |
|+.=.++o . |
|+ *.=+ . |
|ooo.o.oo. |
|++ .. .So . E |
|++. .+ o o . |
|= .. o o + . |
| =.. . o . |
|o.o... |
+----[SHA256]-----+
root@k8s-master01:~# ssh-copy-id -i .ssh/id_rsa.pub root@192.168.10.6
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
The authenticity of host '192.168.10.6 (192.168.10.6)' can't be established.
ED25519 key fingerprint is SHA256:rP2GqlXjoG0UGi/kNixh1qXFg1dd1zJHIz2LutbTn80.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.10.6's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@192.168.10.6'"
and check to make sure that only the key(s) you wanted were added.
root@k8s-master01:~# ssh-copy-id -i .ssh/id_rsa.pub root@192.168.10.11
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
The authenticity of host '192.168.10.11 (192.168.10.11)' can't be established.
ED25519 key fingerprint is SHA256:sm5LyiMTU6zs8worQAgtjgx+rQPR/nXQIoBB+ETGPGU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.10.11's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@192.168.10.11'"
and check to make sure that only the key(s) you wanted were added.
root@k8s-master01:~# ssh-copy-id -i .ssh/id_rsa.pub root@192.168.10.13
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
The authenticity of host '192.168.10.13 (192.168.10.13)' can't be established.
ED25519 key fingerprint is SHA256:qibMIGG51Rj4vpV+yEsw0swurRYhrYWWZOWIBPQmC3g.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.10.13's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@192.168.10.13'"
and check to make sure that only the key(s) you wanted were added.
Linux-主机之间创建免密的更多相关文章
- 多台linux主机之间建立免密通信
多台linux主机之间设置免密通信 例:A 向 B设置免密通信 第一步 A生成密钥对 ssh-keygen -t rsa -t 指定秘钥的类型 rsa 秘钥类型 密钥目录:/root/.ssh/(如果 ...
- Linux主机之间ssh免密登录配置方法
由于公司的生产环境有很多台Linux的CentOS服务器, 为了方便机子(假设两台机子A,B)互相之间免密ssh, scp命令操作,配置如下 1. 在A.B上分别创建本机的公钥和私钥,输入命令后连续三 ...
- Linux中配置主机之间的免密ssh登陆
假如 A 要登陆 B在A上操作:1.首先生成密钥对 ssh-keygen (提示时,直接回车即可) 2.再将A自己的公钥拷贝并追加到B的授权列表文件authorized_keys中 ssh-copy- ...
- linux 服务器之间配置免密登录
客户机:172.16.1.2 远程机:172.16.1.3 1.远程机 a.允许root用户通过22端口登录 vi /etc/ssh/sshd_config PORT 22 PermitRootLog ...
- 【Linux】服务器之间的免密登录脚本
在实际运维的过程中,经常需要用到免密登录,下面这个脚本实现服务器之间的免密登录,如下 比如,要实现A服务器与B.C.D服务器的免密登录,只需要将B.C.D服务器的IP地址写在serverlist.tx ...
- Linux OS 集群 免密登录
1. ssh-keygen 生成密钥 2. ssh-copy-id 集群主机名 参考: [图文详解]linux下配置远程免密登录
- Linux系列——配置SSH免密登录
在进行配置之前需要先关闭防火墙.配置hosts映射. 具体参见:Linux系列--常规基础操作 下面重点说明如何配置SSH: 1.编辑sshd服务配置文件,开启免密验证, vi /etc/ssh/ ...
- 两台Linux主机之间文件的复制
使用scp命令可以实现两台Linux主机之间的文件复制,基本格式是: scp [可选参数] file_source file_target 1. 复制文件 命令格式: scp local_file r ...
- Linux机器之间SSH免密钥登录设置
SSH免密钥登录 私钥:密钥留在本机 公钥:密钥发给其他机 hadoop01 生成密钥: ssh-keygen -t rsa (密钥存放路径:/root/.ssh) id_rsa:私钥 id_rsa. ...
- Linux网络第四章:SSH远程管理及通过SSH实现服务器之间的免密连接
目录 一.SSH远程管理基础 1.ssh协议 2.ssh原理 3.配置文件解析 4.登录方法 5.使用ssh协议传输的命令 二.免密连接的实现 1.免密连接原理 2.免密实现环境准备 3.在客户端生成 ...
随机推荐
- JVM解析
synize锁升级
- Prometheus技术分享——如何监控宿主机和容器
这一期主要来跟大家聊一下,使用node_exporter工具来暴露主机和因公程序上的指标,利用prometheus来监控宿主机:以及通过通过Cadvisor监控docker容器. 一.部署node_e ...
- 剑桥英英在线词典 - 可以查单词 可数-不可数 - 英语 a few/few/a little/little
There is _____ milk in a fridge. Let's go buy some. A. a few B. few C. a little D. little 解析:经典老知识点 ...
- Nginx 同时支持 http 和 https SSL 为了能有权限调取摄像头
Nginx 同时支持 http 和 https 当然起项目的会后也分成俩 "dev": "vue-cli-service serve --port=8080", ...
- YUV亮度扫描小工具,如何确定尺寸以及错误尺寸下图像发生什么变化
地址https://github.com/bbqz007/zhelper-wxWidgets 当你有一个帧yuv,但却不知道长宽还有格式时,本demo可以帮你通过扫描Y分量灰度图,确定长宽,然后选择合 ...
- Oss流程分析
最新式上传方案是:前端上传获取token,然后token中带有bucket.账号.回调地址等相关信息,前端直接上传到阿里云,阿里云上传成功后回调之前设定好的地址,完成上传.(下图是技术负责人的图,盗来 ...
- Miracast技术详解(二):RTSP协议
目录 RTSP概述 抓包准备 WFD能力协商(Capability Negotiation) RTSP M1 Messages RTSP M2 Messages RTSP M3 Messages RT ...
- Spring Boot获取配置参数最简单常用的两种方式
一.自定义属性及常量 在开发过程中,我们常常用到的多环境配置文件,常用的有:dev,test,prod,在不同环境下,我们用到的一样的配置参数,例如:redis,mq,回调接口的url配置.这个情况, ...
- 3DCAT首届行业生态交流会|燧光CTO 戴景文:云渲染 XR大发展的助推器
2021年12月17日下午,由深圳市瑞云科技有限公司主办,深圳市虚拟现实产业联合会协办的 云XR如何赋能元宇宙--3DCAT实时云渲染首届行业生态合作交流会 圆满落幕.此次活动围绕"云XR如 ...
- 新闻新体验!3DCAT助力开启红网“元宇宙”新闻直播间
2022年10月20日,湖南红网新媒体集团"华章·20--红网时刻新闻党的二十大报道云展厅"正式上线.深入到新闻元宇宙,开拓新的传播领域,这也是红网党政新媒体元宇宙传播应用实验室的 ...