Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the Linux tip to achieve password-free login?

Shulou Source: shulou.com Published: 2022-06-01 02:53:02 10月03日 Update

This article will explain in detail about Linux tips to achieve password-free login is how, the content of the article is of high quality, so the editor to share with you to do a reference, I hope you have a certain understanding of the relevant knowledge after reading this article.

Our servers are generally deployed on Linux, of course, you may use different development versions, everyone has different opinions, I have been using ubuntu, one of the reasons is familiar, although the operation and maintenance friends have always recommended CentOS. The first version of ubuntu is version 14. If you install a new machine, version 16 is more suitable for you. Both versions are stable.

Login is a hassle, especially if you often need to log on to the server on your own machine, enter your password every time you log in, once or twice is good, much, really tedious, let's share below, how to log in without a password, very simple.

The first step, generate the public key

First check whether there is a local generated key, if so, the second generation will affect the previously set, you can use the following command

Cat / .ssh/id_rsa.pub

If not, enter the following command to generate the public and private keys on the local machine

Ssh-keygen-t rsa

Second, copy the public key to the remote host

Ssh-copy-id-I ~ /. Ssh/id_rsa.pub root@ your IP address

On Linux tips to achieve password-free login is how to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Login password public key generation skill content command article more server machine version knowledge article service input different good tedious different opinions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL Shulou Tech Info Huawei NVidia