In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Ssh password-less login uses public and private keys. Under linux, you can use ssh-keygen to generate public / private key pairs. Let me take redhat 5 as an example.
There are machines A (192.168.122.223) and B (192.168.122.222). Now I want A to log in to B through ssh password-free.
1. Generate a public key / private key pair under machine A.
Add the-P parameter item to indicate the password, and-P''means the empty password, or you don't need the-P parameter, so you have to enter three cars and enter once with-P.
It generates a .ssh directory under / root, with id_rsa and id_rsa.pub under .ssh.
two。 Copy the id_rsa.pub under A machine to B machine, and in the .ssh/authorized_keys file of B machine, I copy it with scp.
Since there is no password-free login, you need to enter a password.
3.B machine adds the id_rsa.pub copied from machine A to the .ssh / authorized_keys file.
The permission of authorized_keys is 600.
4. Machine A logs in to machine B.
Now machine A can log in to machine B without a password.
Summary: the login machine can have a private key, and the logged-in machine must have the public key of the login machine. This public / private key pair is usually generated on the private key host. The above is the public / private key pair using the rsa algorithm, of course, you can also use dsa (the corresponding file is id_dsa,id_dsa.pub)
If you want An and B machines to log in to each other without a password, then B machines can be configured in the same way as above.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.