当前位置:网站首页>During SSH configuration key login, you need to pay attention to whether the private key is set with a password
During SSH configuration key login, you need to pay attention to whether the private key is set with a password
2022-06-11 02:11:00 【Lao Luo who likes playing football】

As the title
Recently, you need to configure SSH Log in to the background server to check the log , And then we use SSH Key login method for , Because the key pair ( Public and private keys ) It is generated in the server background management system , And it was applied for some time ago , I forgot that there was a private key filled in the key application passphrase, When using it, I think there is no private key , Therefore, various logins are unavailable due to incorrect configuration , Wasted a lot of time
Some articles on the Internet mention SSH Sign in , Some of the headlines say 《SSH Public key login 》, This can lead to misunderstanding or affect memory SSH The actual process of key login
Key login simply means that we generate a key pair ( Public and private keys ), Then we put the public key on the target server , Then use the key to log in to the target server .
The password for the private key (passphrase) When we generate the key pair, we have the opportunity to set , This setting is optional . Generally, it is better to set it based on security considerations
When a password is set for the private key, it will , Then use the private key ssh To the target server , The terminal will prompt you to enter the password of the private key . If you don't want to enter the password of the private key every time , The simplest is not to set a password . But I don't want to input the password every time ?
So please ssh-agent It's out of the way (PS: ssh-agen There is also a powerful private key forwarding function , It is used for springboard login , For details, please see the article I share below )
# Turn on agent
eval `ssh-agent`
# Add the private key to the cache ,add The password for entering the private key will be provided when entering
ssh-add Your private key file
# It can be used -l Parameters to see , Those private keys were added , Confirm the upper limit add Whether the private key of
ssh-add -l
After the above operation , We are in the current SHELL Use ssh Key login eliminates the need to enter the private key password every time
SSH Login mode
- Login with account number and password
- Key login
- Certificate login
Reference article
边栏推荐
- Union find
- In May, the main growth ranking list (platform of station B) of the single flying melon data up was released
- Our understanding of the industrial Internet may be more out of the existing logic
- 【MATLAB】图像基本运算(点运算、算术运算、缩放、旋转)
- NFT Insider #61:Animoca Brands 在 340 项投资中持有 15 亿美元的加密资产
- Coordinates of the capital of each province in China
- Task07: double pointer
- Alibaba cloud Tianchi online programming training camp_ Task arrangement
- 中国各省份省会的坐标
- 腾讯测试开发岗面试上机编程题
猜你喜欢

MD61计划独立需求导入BAPI【按日维度/动态模板/动态字段】

ABAP CDS实现多行字段内容拼接
![Is it correct to declare an array in this way? int n=10,a[n]; What if so? const int n =10; int a[n];](/img/e9/b09151d9b92d0a216e2ba079a7beb4.jpg)
Is it correct to declare an array in this way? int n=10,a[n]; What if so? const int n =10; int a[n];

Task01: be familiar with the basic process of news recommendation system

Win11系统使用DISM命令备份驱动程序的方法

Task07: double pointer

adb 常用命令解析

ABAP CDs realizes multi line field content splicing

Introduction and practice of QT tcp/udp network protocol (II) UDP communication

flutter_ Swiper carousel map plug-in
随机推荐
SSH配置密钥登录时需要注意私钥是否设置了密码(passphrase)
Number of different paths
[error record] Android application security detection vulnerability repair (strandhogg vulnerability | set activity component android:taskaffinity= "")
Programming implementation: input any English month, and output its corresponding Chinese prompt after looking up the month table. Abbreviations can also be found.
我们对于产业互联网的认识,或许更多的要跳出现有的逻辑之外
[music] playing blue and white porcelain based on MATLAB [including Matlab source code 1873]
Shell learning tutorial (super detailed and complete)
【圖像處理】基於matlab GUI多功能圖像處理系統【含Matlab源碼 1876期】
CRS-4544 & ORA-09925
Database overview
The argument type ‘int?‘ can‘t be assigned to the parameter type ‘num‘
Task04: String
【MATLAB】图像复原
Switch case uses enumeration classes to compare
[leetcode] same tree + symmetric binary tree
聊聊一个注解实现接口重试
QT widget's simple serial port assistant (qserialport)
Understanding of pointers
【MATLAB】图像分割
[Qt] Erreur: qapplication: No such file or directory Solution