Configure Linux mutual trust connections using RSH/SSH

Source: Internet
Author: User

1. rsh Configuration

1. Install software and start services

Chkconfig rsh on

Chkconfig rlogin on

Service xinetd reload

Create the/etc/hosts. equiv file

Touch/etc/hosts. equiv

Chmod 600/etc/hosts. equiv

Chown root: root/etc/hosts. equiv

Edit

+ <Hostname1>

+ <Hostname2>

Ii. ssh Configuration

1. Configure ssh to generate a key

Su-<user_name>

Mkdir ~ /. Ssh

Chmod 700 ~ /. Ssh

/Usr/bin/ssh-keygen-t rsa # Accept the default settings.

Exit

2. Activate user equivalency of host1

Host1

Su-<user_name>

Cd ~ /. Ssh

Cat id_rsa.pub> authorized_keys

Scp authorized_keys Host2:/<user_home_diretory>/. ssh/

Exit

3. Activate user equivalency of host2

Host2

Su-<user_name>

Cd ~ /. Ssh

Cat id_rsa.pub> authorized_keys

Scp authorized_keys Host1:/<user_home_diretory>/. ssh/

Both hosts contain: authorized_keys

4. Test

Su-<user_name>

Ssh host1 date

Ssh host2 date

Ssh host1.localdomain date

Ssh host2.localdomain date

Exec/usr/bin/ssh-agent $ SHELL

/Usr/bin/ssh-add

Exit

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.