SSH to add a trust relationship, so that SSH and SCP commands do not require password verification

Source: Internet
Author: User
Tags sftp access

Briefly describe the method:

First, run the command ssh-keygen-t sra \ on the local machine to generate the RSA key.

(This command generates a key pair: id_rsa and id_rsa.pub. They are saved in ~ by default ~ /. Ssh/directory. You can change id_rsa.pub to local_rsa.pub to avoid the same name as id_rsa.pub on the remote host. During the generation process, pass phrase is required. This is used to protect the use of the private key. That is, you must enter this password every time you use the private key, therefore, do not enter any characters here. Press enter directly .)

Copy the generated public key to the/root/. Ssh directory on the desired machine. Run the following command:
SCP id_rsa.pub peer IP Address:/root/. Ssh/authorized_keys
After SSH, SCP, and sftp access, no password is required.

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.