当前位置:网站首页>SSH password free login
SSH password free login
2022-06-21 12:36:00 【2022 Chongya】
linux To configure ssh Password free login :
explain :ssh The security shell for remote login has identity authentication mechanism :
—— user name + password
—— Key login
Introduction to the environment :
host1:156.3.203.128
host2:156.3.203.251
1. stay host1 Generate public key under host / Private key pair
Execute the following command , Keep going back
[[email protected] ~]# ssh -keygen -t rsa

After command execution , stay /home/user Lower generation .ssh Catalog ,.ssh Directory is id_rsa and id_rsa.pub Two documents .
![]()
2、 take host1 Under the main engine id_rsa.pub Copied to the host2 Under the main engine

There is no password free login at this time , So enter host2 Password
3、host2 The host must copy the id_rsa.pub The contents of the file are added to /home/user/.ssh/authorzied_keys In file
Need modification authorized_keys The permission of the file is 600

testing :
Now? host1 The host can log in without password host2 The main engine

explain : The first 2、3 Step can be done with one command :ssh-copy-id 192.168.0.11
summary : The logged in machine can have a private key , The logged in machine must have the public key of the logged in machine . This public key / The private key pair is usually generated on the private key host .
It's for rsa The public key of the algorithm / Private key pair , You can also use it dsa( The corresponding file is id_dsa,id_dsa.pub)
Want to make host1,host2 Mutual login without password , that host2 The host can be configured in the same way as above
边栏推荐
- Educator web exercise - creating a text area
- DVWA configuration tutorial
- Version of opengauss
- 12 tips for achieving it agility in the digital age
- Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection
- 给表单组件添加说明
- Educoder Web练习题---页面结点元素
- 显示Oracle某一张表的所有索引
- Educoder Web练习题---结构元素
- 【Appium踩坑】关闭inspector后打开weditor,uiautomator2.exceptions.NullPointerExceptionError: -32001 Jsonrpc er
猜你喜欢

Redis-bitmap 位图

青龙面板XDD-PLUS登录提示“当前登录环境异常,为保障您的账号安全,暂时无法登录。建议将两个设备连接同一网络或WIFI后重新扫码”解决方法。

Vs code + GDB download and debugging of STM32 development

i. MX - rt1052 input / output (GPIO)

Educoder table label - basic table structure

Educoder Web练习题---文本层次语义元素

3D Slicer导入标签与查看标签

About SDRAM memory

Educoder web exercises -- text level semantic elements

路由器Telnet及ACL配置
随机推荐
7. 指针
为什么世界上只有13个根域名服务器
typescript localStorage 封装
"Forget to learn again" shell process control - 36. Introduction to the for loop
The difference between knowing and understanding
常用的17个运维监控系统
Redis最大内存淘汰策略
方法的繼承和重寫
Add a description to the form component
PostgreSQL 逻辑存储结构
~~~~配置
[100 unity pit knowledge points] | unity controls the object to continuously point in a certain direction
五大(七大)原则-系统学习三
Graveyard
Apache shardingsphere 5.1.2 release | new driving API + cloud native deployment to create a high-performance data gateway
Educator table labels - settings for Advanced Table Styles
Héritage et réécriture des méthodes
Five (seven) principles - systematic learning III
8 种最坑的SQL错误用法
计算距离的几种方式汇总