Log on to the remote host using SSH without a password

Source: Internet
Author: User
SSH password-less remote host login method: generate a public/private key pair on the client, save the private key file on the client, and then upload the public key file to the server (remote host) 1. generate a public/private key pair on the client cb @ cbloud # ssh-keygen... cb @ cbbench # ls. ssh/id_rsaid_rsa.pub... SSH password-less remote host login method: generate a public/private key pair on the client, save the private key file on the client, and then upload the public key file to the server (remote host) 1. generate a public/private key pair on the client cb @ cbloud # ssh-keygen... cb @ cbbench # ls. ssh/id_rsa id_rsa.pub // id_rsa is the private key by default, id_rsa.pub is the public key. 2. Upload The public key file to the remote host. cb @ cbw.# scp ~ /. Ssh/id_rsa.pub cb @ cb48:/home/cb /. ssh3. log on to the remote host and write the client's public key to the authorized_keys file cb @ cbloud # ssh cb @ cb48password: ***** cb @ cb48 # cd. ssh/cb @ cb48 # cat id_rsa.pub> authorized_keys4, complete. log on to the remote host cb @ cb133 # ssh cb @ cb48cb @ cb48 # // no password prompt on the client side, directly log on to the console. 5. two-way logon without a password: use the remote host as the client and the original client as the remote host. Repeat steps 1 ~ 4. you can log on to two machines through ssh without a password. 6. log on to multiple remote hosts from one client. Repeat step 2 ~ 3. Upload the client's public key file to multiple remote hosts and write it to the authorized_keys file on the remote host.
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.