Establish an ssh Trust Relationship in linux and trust the linuxssh Service

Source: Internet
Author: User

Establish an ssh Trust Relationship in linux and trust the linuxssh Service

Create SSH Trust
Use host A as the client (initiate an SSH request ip Address: 192.168.200.170)
Host B is used as the server (ip address for receiving ssh requests: 192.168.200.149)
The above lists the hosts that actively initiate SSH login requests and the hosts that receive the requests.
<1> host A generates A Public/Private Key Certificate
[Root @ buddytj-10. ssh] #Ssh-keygen-t rsa# Rsa algorithm Certificate
Generating public/private rsa key pair. (Press ENTER below)
Enter file in which to save the key (/root/. ssh/id_rsa ):
/Root/. ssh/id_rsa already exists.
Overwrite (y/n )? Y (because my certificate already exists, overwrite it)
Enter passphrase (empty for no passphrase ):
Enter same passphrase again:
Your identification has been saved in/root/. ssh/id_rsa. (private key)
Your public key has been saved in/root/. ssh/id_rsa.pub. (public key)
The key fingerprint is:
C1: 26: cc: 88: 2b: 05: dd: c3: 6b: 1e: 78: 5d: da: 9c: da: 8a
The certificate generates id_rsa (Private Key) | & id_rsa.pub (Public Key)
<2> pass the Public Key generated by host A to host B
[Root @ xyh. ssh] #Scp id_rsa.pub 192.168.200.149:/root/. ssh/
Rename A's public key on host B
[Root @ xyh. ssh] #Mv id_rsa.pub authorized_keys 
<3> the remote SSH service on host A and host B has been completed.
Haha, it's super simple!

Reference from: http://xieyanhuang123.blog.51cto.com/713874/346217

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.