In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge about how to connect to the server through a key. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.
1. Generate key file ssh-keygen-t rsa-b 2048-v` Note: the connection method is basically the same as that of Git. If you have previously generated a public key or key for authentication by Git, use the default path ~ / .v`. Switch the path and name to avoid overwriting. For example: `Generating public/private rsa key pair.Enter file in which to save the key (/ home/vien/.ssh/id_rsa): dataAutoProcess
Specifies the file name, which is generated by the current path by default if no path is specified. As shown in the above prompt, the key name for the current directory is dataAutoProcess, and the public key name is dataAutoProcess.pub. The rest of the key is OK.
two。 Add this certificate
Then go to the directory where you generated the public key and push the public key to the remote server to add the certificate. Ssh-copy-id-I dataAutoProcess.pub vien@120.119.110.8
Change dataAutoProcess.pub to your public key name, vien@120.119.110.8 to your server user name and address, and enter your password.
3. Testing mv dataAutoProcess dataAutoProcess.pem # can change the name of your key, or ssh-I dataAutoProcess.pem vien@120.119.110.84. Cancel password login
When you test that your key can log in, make sure you can connect and cancel the password login method. After sudo vim / etc/ssh/sshd_config enters the vim editor, press / enter to find mode, then paste PasswordAuthentication, enter and navigate here, press I to enter insert mode, release the comment, and change it to no. # change PasswordAuthentication yes to PasswordAuthentication no to restart ssh sudo service ssh restart
These are all the contents of the article "how to connect to the server through a key". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.