Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Master and slave nodes in linux do not need to log in with each other.

Shulou Source: shulou.com Published: 2022-06-03 05:30:02 11月24日 Update

Three nodes are installed, master,slave1,slave2

1. Master node key-free landing slave node

Enter ssh-keygen-t rsa in the host point window all the way back to the car.

two。 Then enter

Cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys

Chmod 600 ~ / .ssh/authorized_keys

3. Then send the authorized_keys to the slave node slave1,slave2

Scp authorized_keys zkpk@slave1:~

Scp authorized_keys zkpk@slave2:~

4. To generate a key from a node, follow the first step

5. Move authorized_keys to the .ssh directory

Modify permissions

Chmod 600 ~ / .ssh/authorized_keys

6. Log in to the master node from the slave node, and log in to each other between the slave nodes

Cd .ssh

Ssh-copy-id-I id_rsa.pub zkpk@master; can enter this command.

Tags: Node login input three host between command permission step directory generate move master and slave Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft vpn macOS OPPO Reno Docker