In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use the private key to log in to the Linux system, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
How does the Linux system log in using the private key? The Linux server has to enter the responsible password every time. In order to log in to the Linux server conveniently and safely, use the private key and public key to log in.
Generate ssh public key pair:
# ssh-keygen-t rsa
-t? Rsa?? Refers to the public key / private key pair encrypted by rsa.
-b? Refers to the length of the public key / private key pair, which is generally 1024 ~ 2048. The default is 2048 bytes.
Go to the / root/.ssh directory:
# cat id_rsa.pub > > authorized_keys# chmod 600 authorized_keys
Download the private key id_rsa so that you can log on to the server without using the private key!
PS:
Configuration file / etc/ssh/sshd_config
During the test
# PasswordAuthentication yes#PermitEmptyPasswords no
Without commenting out #, you can also log in through the private key.
Summary: during the configuration process, you forgot cat id_rsa.pub > > authorized_keys, which made it impossible to log in to the server after downloading the private key.
After reading the above, do you know how to use the private key to log in to the Linux system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.