In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to set ssh password-free login under linux". In daily operation, I believe many people have doubts about how to set ssh password-free login under linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to set ssh password-free login under linux". Next, please follow the editor to study!
# # setting ssh password-free login with linux7 (you can also log in after password change)
[root@rhel7 ~] $ssh-keygen # production key file
Generating public/private rsa key pair.
Enter file in which to save the key (/ root/.ssh/id_rsa):
/ root/.ssh/id_rsa already exists.
Overwrite (YBO)? Y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in / root/.ssh/id_rsa.
Your public key has been saved in / root/.ssh/id_rsa.pub.
The key fingerprint is:
32:a8:b6:60:58:9e:c4:fe:eb:9d:69:d5:ff:3f:d1:3a root@rhel7
The key's randomart image is:
+-[RSA 2048]-+
| | |
| | |
| | |
|. . | |
| +. O S. |
|. = o o.. .. |
| o.*. . .. |
| .o o.. o. E. |
| |.. + oo. Oo |
+-+
[root@rhel7 ~] $ssh-copy-id 192.168.32.128 # copy to another server
/ usr/bin/ssh-copy-id: INFO: attempting to log in with the new key (s), to filter out any that are already installed
/ usr/bin/ssh-copy-id: INFO: 1 key (s) remain to be installed-- if you are prompted now it is to install the new keys
Root@192.168.32.128's password:
Number of key (s) added: 1
Now try logging into the machine, with: "ssh '192.168.32.128'"
And check to make sure that only the key (s) you wanted were added. [root@rhel7 ~] $ssh 192.168.32.128 # password-free login
Last login: Mon Nov 20 22:30:47 2017 from 192.168.32.100
[root@mysql ~] # exit
Logout
Connection to 192.168.32.128 closed.
[root@mysql ~] # passwd
Changing password for user root.
New password:
BAD PASSWORD: it is based ona dictionary word
Retype new password:
Passwd: all authentication tokens updated successfully.
[root@rhel7 ~] $ssh 192.168.32.128 # after changing the root password, you can still log in without a password.
Last login: Mon Nov 20 22:32:35 2017 from 192.168.32.100
At this point, the study on "how to set up ssh password-free login under linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.