This article mainly introduces linux password-less ssh login settings. For more information, see
Overview
Ssh and scp between some common devices can save a lot of time without entering a password.
Generate key
Check whether the local device has a key. If yes, do not generate the key. Otherwise, the previously connected devices will be affected.
Copy codeThe code is as follows:
Ls ~ /. Ssh/id_rsa.pub
If no, use ssh-key-gen to create the public key and key on the local host.
Copy codeThe code is as follows:
Ssh-keygen-t rsa
Press enter
Copy the public key to the remote host.
Copy codeThe code is as follows:
Ssh-copy-id-I ~ /. Ssh/id_rsa.pub
Directly log on to the remote host
Copy codeThe code is as follows:
Ssh 192.168.0.3
Log on directly without a password.
The password is still required for ssh from 192.168.0.3. you can follow the above steps to operate on 192.168.0.3. you can also omit the password.