Ssh password-free login, ssh password login
Ssh password-free Login
Note:
Ssh password-less logon requires the public key and private key.
In linux or mac systems, you can use ssh-keygen to generate public/private key pairs.
1. Generate a key (~ /. Generate id_rsa and id_rsa.pub under the ssh directory.
Ssh-keygen-t rsa
2. Send the public key to the remote host ~ /Directory
Scp ~ /. Ssh/id_rsa.pub root@192.168.0.0 :~ /
3. log on to the remote host and append the public key to the authorization key.
Cat ~ /Id_rsa.pub> ~ /. Ssh/authorized_keys (grant 600 permission to chmod 600 authorized_keys)
4. Now you can log on normally.
Ssh root@192.168.0.0
5. To simplify login operations
~ /. Bashrc, add the following line: alias loginssh = "ssh root@192.168.0.0" and then source ~ /. Bashrc
6. Then you can log on more easily.
Loginssh
Note: The above operations are based on the company's test server ~~