当前位置:网站首页>SSH password free login - two virtual machines establish password free channel two-way trust
SSH password free login - two virtual machines establish password free channel two-way trust
2022-07-29 07:01:00 【hgswnsa】
List of articles
Establishment of secret free passage
Prepare two virtual machines , Use root user
A:192.168.225.130
B:192.168.225.134
Three steps :
1、 Generating key pairs locally
2、 Upload the public key to the other machine
3、 verification : Log in to the other machine remotely
1、 Generating key pairs locally
Generate key pair , stay A Machine use root User generated key pair , The key pair is placed under the user's home directory
perform ssh-keygen -t rsa command , Keep pressing enter

2、 Upload the public key to B machine , requirement B Machine permission root The user login
Use ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected] command , hold A The public key of the machine is given to B machine
-i Specify the public key file

3、 Verify whether a password is required for login
Use ssh -p 22 [email protected] command , Directly in A Machine remote login B machine
-p Designated port
You can see that you don't need to enter a password , Remote login to B machine 
The above is the establishment of one-way trust ,A To B Secret free passage of , The following will establish B To A Secret free passage of
The operation steps are the same as above ,B Machine as a local machine ,A The machine acts as a remote machine
1、 Generating key pairs locally
ssh-keygen -t rsa

2、 Upload the public key to A machine , requirement A Machine permission root The user login
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]

3、 Verify whether a password is required for login
ssh -p 22 [email protected]

thus , Two way trust establishment is complete ,A The machine can log in remotely B machine ,B The machine can also log in remotely A machine
summary
Establishing a secret free channel is actually two steps : Generating key pairs locally , Give the public key to the remote machine
边栏推荐
- Sword finger offer II 115: reconstruction sequence
- 二次元卡通渲染——进阶技巧
- Teacher Wu Enda's machine learning course notes 04 multiple linear regression
- 数仓建模,什么是宽表?如何设计?好处与不足
- 【冷冻电镜】Relion4.0——subtomogram教程
- 竣达技术 | 适用于”日月元”品牌UPS微信云监控卡
- 矩阵分解与梯度下降
- 2D cartoon rendering - advanced skills
- 【技能积累】presentation实用技巧积累,常用句式
- 王树尧老师运筹学课程笔记 08 线性规划与单纯形法(单纯形法)
猜你喜欢

Cvpr2022oral special series (I): low light enhancement

Teacher wangshuyao's notes on operations research course 10 linear programming and simplex method (discussion on detection number and degradation)

【冷冻电镜】Relion4.0——subtomogram教程

【flask入门系列】Flask-SQLAlchemy的安装与配置

【论文阅读 | cryoET】Gum-Net:快速准确的3D Subtomo图像对齐和平均的无监督几何匹配

网上传说软件测试培训真的那么黑心吗?都是骗局?

【经验】通过跳板机远程连接内网服务器的相关配置

联邦学习后门攻击总结(2019-2022)

Federal learning backdoor attack summary (2019-2022)

矩阵分解与梯度下降
随机推荐
Unity探索地块通路设计分析 & 流程+代码具体实现
SS command details
【C语言刷LeetCode】1054. 距离相等的条形码(M)
1172. 餐盘栈 有序列表+栈
Teacher wangshuyao wrote the notes of operations research course 00 in the front
基于C语言设计的学生成绩排名系统
Invalid access control
王树尧老师运筹学课程笔记 08 线性规划与单纯形法(单纯形法)
Unity exploration plot access design analysis & process + code specific implementation
leetcode-1331:数组序号转换
Teacher wangshuyao's notes on operations research 05 linear programming and simplex method (concept, modeling, standard type)
Etcd principle
【经验】通过跳板机远程连接内网服务器的相关配置
模拟卷Leetcode【普通】093. 复原 IP 地址
Unity免费元素特效推荐
Thread - thread safety - thread optimization
【CryoEM】FSC, Fourier Shell Correlation简介
【技能积累】presentation实用技巧积累,常用句式
王树尧老师运筹学课程笔记 01 导学与绪论
好文佳句摘录