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 configure SSH one-way password-less access by CentOS

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to configure CentOS one-way password-less access to SSH, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

When studying a file system, we need to install the software to the client remotely and access it without SSH password, and we also need to transfer files to the client remotely. It is very inconvenient to enter the root password every time, so we think of using ssh key to generate the public key and private key to verify, and avoid having to enter the root password every time.

Server architecture:

System: CentOS 6.5x64

Main control terminal Avram 192.168.0.150

Remote host BVR 192.168.0.151

Principle:

Using ssh key to generate public key and private key, the key is equivalent to a key, and the public key is equivalent to a door lock, of course, we take the key to open the lock, by the same token, we put the key on the local server, that is, server A, and put the public key on the remote server, that is, remote host B, then we can log in to the remote host B without a password from the host A ssh.

Steps:

1. Generate public key and private key files without SSH password access on host An of the main control terminal.

[root@localhost] # ssh-keygen-t rsa

Note: in the execution of the command, press enter three times in a row to generate.

2. Upload the public key from the master to the remote host B.

[root@localhost] # ssh-copy-id-I / root/.ssh/id_rsa.pub root@192.168.0.151

You need to enter the root password of remote host B once in the middle.

3. Test the password-free SSH remote host B on the main control terminal.

[root@localhost ~] # ssh root@192.168.0.151

You can see that you have not entered the root password of host B, and you can remotely from A SSH to B.

The above is all the contents of the article "how to configure SSH one-way password-less access by CentOS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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