Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize password-free login in Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to achieve password-free login in Linux, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will 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, more, 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

After typing, if you find it troublesome, you can enter all the way, and you don't need to worry about other things.

Second, copy the public key to the remote host

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

After entering the password, come out this prompt, so you can log in to the server without a password. Let's give it a try.

Step 3: log in

On how to achieve password-free login in Linux 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.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report