Linux System Password-free login remote server

Source: Internet
Author: User
Tags centos server
  1. Generate public key private key on current Linux
    Ssh-keygen
    The public key private key holds the path: ~/root/.ssh/
    Id_rsa id_rsa.pub

  2. Login by remote host , enter directory ~/root/.ssh/
    Whether the Authorized_keys file exists, and if the new Authorized_keys file does not exist
    Copy the contents of the Id_rsa.pub file generated in the first step to the Authorized_keys
    You can also use the command Ssh-copy-id [email protected]

  3. SSH remote If you do not want to enter the IP address every time to modify the/etc/hosts file
    Add 192.168.1.1 CentOS to the first line of the Hosts file
    Next time you need to link this server directly input SSH CentOS can
    Note : The server account is the same as the current login user name to take effect. Otherwise you need to enter SSH [email protected]

  4. For frequent remote servers can be set
    CD bin/
    VIM ABC
    Enter the following:
    SSH 192.168.1.1
    chmod +x ABC
    The next time you enter the ABC command directly, you can remote to the CentOS server
    Note: If the setting is based on the third step
    The IP address can also be set to CentOS

Linux System Password-free login remote server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.