一、rsh的配置
1、安装软件、启动服务
chkconfig rsh on
chkconfig rlogin on
service xinetd reload
创建/etc/hosts.equiv 文件
touch /etc/hosts.equiv
chmod 600 /etc/hosts.equiv
chown root:root /etc/hosts.equiv
编辑
+<hostname1>
+<hostname2>
二、ssh配置
1、配置ssh,生成密钥
su - <user_name>
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa # Accept the default settings.
exit
2、激活host1的user equivalency
Host1
su - <user_name>
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys Host2:/<user_home_diretory>/.ssh/
exit
3、激活host2的user equivalency
Host2
su - <user_name>
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys Host1:/<user_home_diretory>/.ssh/
两台主机都包含:authorized_keys
4、测试
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
【编辑推荐】