Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

SSH adds mutual trust mechanism

Shulou Source: shulou.com Published: 2022-06-03 07:46:19 11月23日 Update

Suppose three hosts establish mutual trust mechanism: master, slave1, slave2

1. Generate key: execute the following command on the three hosts to generate the key

Ssh-keygen-t rsa (rsa is the key encryption algorithm. After executing the command, click enter three times in a row)

two。 Create text under the path where the key is generated (~ / .ssh /)

Touch authorized_keys

3. Modify the permissions of the file

Chmod 600 authorized_keys

4. Append the public key to the text file: all three public keys are added to the file

Cat id_rsa.pub > > authorized_keys

5. Copy the file to another

6. The three log in to each other without a password.

Tags: Key file generation three host public key command three mechanism enter key password text permission algorithm path encryption login Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux MySQL vpn Shulou Technology