Linux Host Trust

Source: Internet
Author: User

By default, SSH will authenticate with a password, without any configuration of the system, and you can log on to the remote server using your account and password. You can also use a key-based authentication method to achieve the effect of password-free login (the following are the specific configuration steps: Two server IPs, 10.0.1.1 and 10.0.1.2 respectively):

(1), create key
#ssh-keygen-d//plus parameter d is to create a SSH2-based key pair
#Generating public/private RSA key pair.

#Enter file in which to save the key (/ROOT/.SSH/ID_RSA): [Carriage return]
#Created directory '/root/.ssh '.

#Enter passphrase (empty for no passphrase): [Carriage return]

#Enter same passphrase again: [Enter]

Your identification has been saved In/root/.ssh/id_rsa.
Your public key has been saved in/root/.ssh/id_rsa.pub.
The key fingerprint is:
01:90:08:9E:7D:42:69:01:96:52:D7:CA:9F:53:43:DF [email protected]
(2), publish a common key to another host on 10.0.1.2
Publish the id_dsa.pub to the server and rename it to Authorized_keys:
#scp/root/.ssh/id_rsa.pub [Email Protected]:/root/.ssh/authorized_keys
[email protected] ' s password: [Enter password]
(3), modify the permission owner (on the 192.168.1.2 host)
# chmod 644/root/.ssh/authorized_keys

  

Linux Host Trust

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.