There are two machines a and B. now you need to add user1 of machine a to the user2 user trust list of Machine B, so that user user1 of machine a can directly ssh to user 2 of Machine B step: 1, enter Machine a/home/user1 /. run mkdir-p/home/user1 /. ssh: Check whether there is an id_rsa in this directory. there are two machines a and B. now you need to add user1 of machine a to the user2 user trust list of Machine B, so that user user1 of machine a can directly ssh to user user2 of Machine B.
Steps:
1. enter Machine a/home/user1 /. run mkdir-p/home/user1 /. ssh: Check whether there is an id_rsa.pub file in the directory. if not, run the ssh-keygen-t rsa command to generate the file. copy the content of the file;
2. go to machine B/home/user2 /. create an ssh directory if no one exists. execute vi authorized_keys in the directory, paste the copied content in step 1 in the last line, and save and exit;
3. add "/etc/hosts. allow" of the vi B server and a line: sshd: [here is the ip address of machine a. If it is a dual-path, add two ip addresses]
Run ssh user2 @ B in the user1 directory of machine a to connect to Machine B.