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

Ssh password-less connection

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Key-based connection: to log on to a remote host without entering a password, relative to the user

Public Key and Private Key

--is a key pair obtained by an encryption algorithm

The public key is the public part of the key pair. The public key is made public by me, used for encryption and signature verification, and is used by others.

The private key is the private part. The private key is used for decryption and signature, for your own use.

--The key pair obtained by this algorithm can be guaranteed to be unique worldwide.

--When using this key pair, if a piece of data is encrypted with one key, it must be decrypted with the other key.

--When the user sends a file, he signs it with his private key and someone decrypts it with the public key he gives, ensuring that the message was sent by him. digital signature.

When the user accepts the file, someone else encrypts it with his public key and he decrypts it with his private key, ensuring that the message can only be received by him. To avoid being seen by others.

--If it is a symmetric encryption algorithm, it is the same; if it is an asymmetric encryption algorithm, the public key and private key are different.

Note: If you want to connect to a machine remotely without entering a password, copy your public key to it.

If the other party changes the password, it does not affect the access, because what is stored in the file is not the password, but the fingerprint information string, so it does not take the password verification.

If you want to access each other without password, then give each other the public key.

Specific experiments:

Experimental environment:

node1:192.168.0.100

node2:192.168.0.102

2. Generate a key pair at node1

[oracle@leopard ~]$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

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

Database

Wechat

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

12
Report