Mutual trust configuration

1. Mutual trust configuration

ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub root@对方ip

1.1 Before configuring mutual trust:

insert image description here

1.2 Generate a secret key

insert image description here

1.3 Copy the secret key

insert image description here

1.4 Password-free remote

insert image description here
Mutual trust established successfully

2. This machine is secret-free

The password-free operation of this machine is similar to
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
insert image description here
Among them, the 600 permission of authorized_keys cannot be omitted.

Guess you like

Origin blog.csdn.net/TS_forever007/article/details/128983793