In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to log in to various CVMs and Github using ssh-key secret-free. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something from this article.
Today, I'm going to teach you how to log in without a secret through ssh-key.
First, we need to generate ssh-key. Note that I am here to take Mac as an example, Windows is also similar, the difference is not big. It's just a different path.
Let's change the directory first. Cd ~ / .ssh /. If there is an error, create a new one.
Then we can configure the global user name and mailbox for Git.
After that, we can generate ssh-key.
After executing the above command, press enter 3 times according to the prompt.
At this point, if you look in the ~ / .ssh directory, there will be two more files. Id_rsa and id_rsa.pub.
Then, configure the ssh key in your SourceTree.
Then go to your Github repository and configure SSH keys.
Then, click New SSH key and add a new ssh key with a custom title that is the content of our previously generated ssh file id_rsa.pub, that is, the public key.
Save it so that you don't have to enter a password to manipulate the code on git in SourceTree. Other git addresses, do the same!
Now, let's get all the servers logged in without a password.
Execute the following command to upload your ssh public key to the server ~ /. Ssh.
Enter and enter the login password of the server.
Then, rename the id_rsa.pub file.
Finally, note that the file permissions are modified.
Then, exit the server. Of course, you can just restart the server.
Execute on the local terminal, ssh root@ your server ip, enter. Log in directly to the server with the specified ip.
Whether you are Huawei server, Alibaba Cloud server, or Tencent Cloud, Baidu Cloud does the same.
Finally, we can give ssh an alias to log in to the server.
In this way, I will directly enter xttblog and log in to my designated server. Multiple servers, multiple aliases can be configured. The same server can also be configured with multiple aliases and multiple users.
After reading the above, do you have any further understanding of how to log in to various CVMs and Github using ssh-key secret-free? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.