RSH/SSH配置Linux之间互信连接

运维 系统运维
本文讲述了RSH/SSH配置Linux之间互信连接的方法,希望对您有所帮助.

一、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

【编辑推荐】

  1. Linux环境下双网卡主机路由配置
  2. linux下如何破解windows密码
  3. Linux下配置JDK和Tomcat
责任编辑:赵宁宁 来源: chinaitlab
相关推荐

2023-03-03 21:17:58

2021-08-28 17:30:51

LinuxSSH

2011-12-06 09:53:08

Rsh

2022-07-23 13:31:25

PuTTY开源Linux

2018-03-09 09:45:52

LinuxSSH登录导语

2010-01-15 12:01:55

CentOS Linu

2010-04-01 10:13:22

CentOS系统

2019-04-08 08:50:02

2011-06-02 10:28:21

Rsh

2014-08-27 11:22:46

LinuxSFTP

2018-10-08 09:35:59

2023-05-04 18:45:11

2009-07-20 19:53:23

SSHLinuxMac

2009-12-31 14:11:12

2022-11-10 07:41:00

sshLinux

2022-03-11 13:28:54

SSHLinux命令

2012-10-22 09:48:03

2010-05-28 17:36:34

Linux远程连接工具

2020-09-20 10:12:54

nccm

2013-08-12 14:23:43

SSH
点赞
收藏

51CTO技术栈公众号