In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains how CentOS Linux creates private keys and SSH profiles. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "CentOS Linux how to create private keys and SSH profiles"!
To introduce CentOS Linux in detail to create public keys and private keys, first let everyone understand the CentOS Linux system, and then a comprehensive introduction to CentOS Linux creation, I hope useful to everyone. CentOS Linux and RHEL distributions with corresponding version numbers have binary compatibility at the package level, i.e., if an RPM package can be installed and run in RHEL products, it can be installed and run in the corresponding version of CentOS Linux. CentOS Linux creates secure private key files.
1, CentOS Linux create sshd_config(/etc/ssh/sshd_config)#ServerKeyBits 768ServerKeyBits 1024 modify encryption strength to 1024bit#PasswordAuthentication yes
PasswordAuthenticatino no No password login #PermitEmptyPasswords onPermitEmptyPasswords no No empty password login
CentOS Linux creates and modifies the hosts.deny(/etc/hosts.deny) file to disable all SSH connections. Add sshd:ALL to the end of the hosts.deny file
CentOS Linux creates and modifies the hosts.allow(/etc/hosts.allow) file, plus IP addresses or IP address segments that allow SSH connections. Add the sshd:IP address or IP address field to the end of the hosts.allow file
4, CentOS Linux create SSH service restart sshd
5, CentOS Linux Create public key and private key file [root@CentOS~]ssh-keygen -t rsa Create public key and private key pair.Enter file in which to save the key (/root/.ssh/id_rsa): ← File name of key, here keep default Enter password Create directory '/root/.ssh'Enter passphrase (empty for no passphrase): ← Enter password Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in/root/.ssh/id_rsa.pub.The key fingerprint is:
tf:rs:e3:7s:28:59:5s:93:fe:33:84:01:cj:65:3b:8e root@CentOS~[root@CentOS ~]# cd ~/.ssh ← Enter the directory of the user SSH profile [root@CentOS ~]# ls -l ← List files total 16 -rw--- 1 root root 951 Sep 4 19:22 id_rsa ← Confirm that the private key has been created-rw-r-- 1 root root 241 Sep 4 19:22 id_rsa.pub ← Confirm that the public key has been created
[root@CentOS ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys ← Output the public key content to the corresponding file
[root@CentOS ~]# rm -f ~/.ssh/id_rsa.pub ← Delete the original public key file
[root@CentOS ~]# chmod 400 ~/.ssh/authorized_keys ← Set the newly created public key file attribute to 400
CentOS Linux export id_rsa file
7. Use PuTTYGen in PuTTY tool group to convert private key, open PuTTYGen, select "Load", select "id_rsa" file just now (when selecting file, file type is changed to "All files (*.*) "), enter the password when you just created the public key and private key, you can successfully convert, and select" Save private key."
8. When logging into Linux system with PuTTY, in the following "SSH"-"Authentication", select the private key file just converted in the "Authentication Private Key File" to log in. The CentOS Linux system was created.
At this point, I believe that everyone has a deeper understanding of "CentOS Linux how to create private keys and SSH configuration files", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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.