SSH Passwordless Login to Linux Server

1. Source machine:
Copy the public key to the target machine
scp  ~/.ssh/id_rsa.pub [email protected]:/home/test/.ssh
 
 
2. Directory machine: 
Rename id_rsa.pub to authorized_keys file.
sudo mv  id_rsa.pub authorized_keys
 
 
3. Directory machine to modify directory permissions:
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys
 
 
4. After performing these steps, you can log in to the Linux server on the source machine without a password:
 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326940358&siteId=291194637