Suppose A is a customer machine and B is the target machine;
To achieve the purpose:
A machine SSH login B machine does not need to enter a password;
Encryption mode RSA|DSA can be selected, the default DSA
Practice:
1. Log In a machine
2, Ssh-keygen-t [RSA|DSA], will generate a key file and a private key file id_rsa,id_rsa.pub or id_dsa,id_dsa.pub
3. Copy the. pub file to the. SSH directory of the B machine, and cat id_dsa.pub >> ~/.ssh/authorized_keys
4, finished, from a machine login B machine's target account, no longer need password;
Ssh-keygen do password verification to enable SSH to the other machine, the SCP does not use the password.
Here's how:
SSH-KEYGEN-T RSA
Then all returns, with default values.
This generates a pair of keys that are stored under the ~/.ssh of the user directory.
Test the public key into the user directory of the other machine and copy it into the ~/.ssh/authorized_keys.
Be sure that both SSH and Authorized_keys have write permissions for the user. Otherwise, validation is not valid. (Today is the problem, looking for a long time the problem), in fact, think carefully, this is done so as not to appear system vulnerabilities.
The use of Ssh-keygen