Linux remote login and password management

  • Linux remote login and password management
  • Release time: 2018-01-19 Source: Online uploader: User

    Keywords: remote password login Linux management

    publish an article
  • Summary: Remote access with password SSH username@remote access IP input password -> complete remote login password-free remote access. In order to use SSH between two Linux machines, no user name and password are required. Digital signature RSA or DSA is used to complete This operation. Suppose A is the client and B is the target machine. To realize A host sshB host does not need to enter a password, you can use RSA or DSA mode, the default DSA. Specific operation process Single login operation process (can satisfy "A host" SSH "B host" without entering a password) Log in to host A ssh-keygen-t[rsa/dsa], the secret key file and private key file id_rsa, id_rsa will be generated .
    1. Remote access with password
      SSH username@ remote access IP
      input password -> complete remote login
    2. Password-free remote access
      In order to use ssh between two Linux machines without user name and password, digital signature RSA or DSA is used to complete this operation. Suppose A is the client and B is the target machine. To realize A host sshB host does not need to enter a password, you can use RSA or DSA mode, the default DSA.

    3. Specific operation process
      Single login operation process (can satisfy "A host" SSH "B host" without entering a password)

      1. Log in to host A
      2. ssh-keygen -t [rsa/dsa], will generate secret key file and private key file id_rsa, id_rsa.pub or id_dsa, id_dsa.pub
      3. Copy the .pub file to the .ssh directory of machine B, and cat id_dsa.pub >> ~/.ssh/authorized_keys
      4. You're done, log in to the target account of machine B from machine A, and no password is needed anymore
    4. Operation process of two-way login

      1. ssh-keygen for password verification can enable ssh to the other party's machine, scp does not need to use a password. The specific method is as follows
      2. Both nodes perform the operation: #ssh-keygen -t rsa, and then press Enter all, using the default value.
      3. In this way, a pair of keys is generated and stored in the user directory under ~/.ssh. The public key is tested in the user directory of the other party's machine and copied to ~/.ssh/authorized_keys (Operation command: #cat id_dsa .pub >> ~/.ssh/authorized_keys ).
      4. Set file and directory permissions
        Set authorized_keys permissions
        chmod 600 authorized_keys
        set .ssh directory permissions
        chmod 700 -R .ssh

    http://blog.csdn.net/kongqz/article/details/6338690

  • These are the Linux remote login and password management content, more remote password login Linux management content, please use the top right of the search for information.

Guess you like

Origin blog.csdn.net/weixin_37991107/article/details/84098694