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.在客户端生成 ...
随机推荐
- 一文了解 NebulaGraph 上的 Spark 项目
本文首发于 Nebula Graph Community 公众号 最近我试着搭建了方便大家一键试玩的 Nebula Graph 中的 Spark 相关的项目,今天就把它们整理成文分享给大家.而且,我趟 ...
- 数组动态表单验证,添加数组,逆序添加,表单验证会错位,发现是key的默认index问题,还有验证trigger问题,添加数据会爆红
数组动态表单验证,添加数组,逆序添加,表单验证会错位,发现是key的默认index问题,还有验证trigger问题,添加数据会爆红 解决方案: trigger: 'blur,change' 换 tri ...
- Debian安装KDE的方法
安装KDE指令 sudo apt install kde-plasma-desktop--最小安装:仅安装桌面环境以及基础软件 sudo apt install kde-standard --标准安装 ...
- 快速搭建Web安全测试环境
快速搭建Web安全测试环境 1.虚拟机安装 2.网站搭建 一.虚拟机安装 下载VMware虚拟机,Windows 虚拟机 | Workstation Pro | VMware | CN 安装VMwar ...
- Linux IPC(进程间通信)摘要(信号灯,共享内存,消息队列,管道)(一)
PS:要转载请注明出处,本人版权所有. PS: 这个只是基于<我自己>的理解, 如果和你的原则及想法相冲突,请谅解,勿喷. 前置说明 本文作为本人csdn blog的主站的备份.(Bl ...
- python面向对象(选课系统)
一.需求分析(课程与班级合为一体) -管理员视图 -1.注册 -2.登录 -3.创建学校 -4.创建课程(先选择学校) -5.创建讲师 -学员视图 -1.注册 -2.登录功能 -3.选择校区 -4.选 ...
- 工作记录:TypeScript从入门到项目实战(项目篇)
Vue项目中使用 前面两篇介绍过TypeScript基础和较深入的东西,本章介绍如何在Vue项目中使用. 项目创建 创建项目直接使用Vue-cli创建 下面是步骤: 1.运行vuecli, 2.选择合 ...
- 记录--JS精粹,原型链继承和构造函数继承的 “毛病”
这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 先从面向对象讲起,本瓜认为:面向对象编程,它的最大能力就是:复用! 咱常说,面向对象三大特点,封装.继承.多态. 这三个特点,以" ...
- Loto实践干货(3) 测量CAN总线通讯数据
Loto实践干货(3) 测量CAN总线通讯数据 最近在做运动控制卡的项目,调试样机的过程中,需要验证CAN总线通讯功能的正确性.以前只限于理论上认识CAN总线,使用的CANbus的通讯卡也是有上位机例 ...
- vue中elementui表格错位问题解决(一次到位)
引入element-resize-detector 在项目引入插件(用来监听元素宽度变化) npm install element-resize-detector --save 在文件中引入(写在sc ...