Linux basic tutorial linux passwordless ssh login settings

Linux basic tutorial linux passwordless ssh login settings

Overview
  ssh, scp between some common devices, without entering a password can save a lot of time.
  Generating a key
  Check whether there is a key locally. If there is, do not need to generate it, otherwise it will affect the previously connected devices.
  The code to copy the code is as follows: (Brothers Linux Training www.lampbrother.net) If
  ls ~/.ssh/id_rsa.pub
  is not available, use ssh-key-gen to create the public key and key on the local host. The code to
  copy code is as follows:
  ssh-keygen -t rsa
  all the way to enter Copy
  the public key to the remote host The
  copy code code is as follows:
  ssh-copy-id -i~/.ssh/id_rsa.pub <a href="http://www.php1.cn/" >
  Directly log in to the remote host The code to
  copy the code is as follows:
  ssh 192.168.0.3
  No password, log in directly.
  The ssh machine from 192.168.0.3 still needs a password. Follow the steps above to operate on 192.168.0.3, or omit the password.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326409739&siteId=291194637