当前位置:网站首页>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
边栏推荐
猜你喜欢

【Appium踩坑】关闭inspector后打开weditor,uiautomator2.exceptions.NullPointerExceptionError: -32001 Jsonrpc er

STM32 notes swj (jtag-dp and sw-dp)

Educoder web exercises - structural elements

创建型模式 - 单例模式

深度学习实战(十):使用 PyTorch 进行 3D 医学图像分割

Educoder 表格标签—表格高级样式的设置

PHP使用Grafika合成图片,生成海报图

Educoder Web练习题---页面结点元素

配电室环境监控系统技术方案

Educoder table label - basic table structure
随机推荐
Common instructions for five basic data types in redis
Educator web exercises - Page node elements
PostgreSQL 逻辑存储结构
uva11292
Huawei cloud releases desktop ide codearts
Router telnet and ACL configuration
方法的继承和重写
12 tips for achieving it agility in the digital age
Subnet mask calculation
UVA1203 Argus
Educoder Web练习题---分组元素
RPC (remote procedure call protocol)
uniapp-微信小程序获取定位授权
云桌面是什么意思?与堡垒机有什么区别?
PHP使用Grafika合成图片,生成海报图
Artifacial Intelligent Project
【毕业季·进击的技术er】大学生涯的成长之路
About SDRAM memory
青龙面板XDD-PLUS登录提示“当前登录环境异常,为保障您的账号安全,暂时无法登录。建议将两个设备连接同一网络或WIFI后重新扫码”解决方法。
Corrigendum to 138 sets of reference solutions to the real problems of Higher Algebra in 2022