1) Generate key: Execute the following statement in the root directory (CD ~/user root):
Ssh-keygen-t Dsa-p "-F ~/.SSH/ID_DSA
The above is a two single quotation mark.
2) Append the id_dsa.pub (public key) to the authorized key:
Cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
3) Copy the authentication file to the other node:
SCP ~/.ssh/authorized_keys user @ Host Name: ~/.ssh/
For example: SCP ~/.ssh/authorized_keys [email protected]:~/.ssh/to enter a password at this time
Finished configuring
Then verify the SSH ongmefex54vm12 prompt to enter the password
It could be. SSH and the file permissions within it are not sufficient
Workaround: Root User Login
- chmod ~/.ssh
2. chmod ~/.ssh/authorized_keys
This problem may also occur if the local login user is inconsistent with the remote login user
Workaround:
Modify the local login user's ~/.ssh/config file, if the wood has the words to build a bar, the content is as follows:
Host hostname
User username
Host hostname2
User UserName2
In this way, the local and remote login user name inconsistency can also ssh hostname login.
Call it
Set SSH password-free login--still prompt to enter password