Linux服务器互信配置
2024-12-04 10:33:45 阅读次数:3
Linux,服务器
文档课题:Linux服务器互信配置.
配置ssh用户等效性
[root@rac3 tmp]# su - grid
[grid@rac3 ~]$ mkdir ~/.ssh
[grid@rac3 ~]$ chmod 700 ~/.ssh
--使用如下命令生成用户身份认证秘钥
[grid@rac3 ~]$ ssh-keygen -t rsa
--一路回车
[grid@rac3 ~]$ ssh-keygen -t dsa
--一路回车
节点1:
[grid@rac1 ~]$ ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[grid@rac1 ~]$ scp ~/.ssh/authorized_keys rac3:~/.ssh/
节点2:
[grid@rac2 .ssh]$ ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
测试
节点3:
[grid@rac3 .ssh]$ ssh rac1 date
[grid@rac3 ~]$ ssh rac1-priv date
[grid@rac3 .ssh]$ ssh rac2 date
[grid@rac3 ~]$ ssh rac2-priv date
节点1:
[grid@rac1 ~]$ ssh rac3 date
[grid@rac1 ~]$ ssh rac3-priv date
节点2:
[grid@rac2 ~]$ ssh rac3 date
[grid@rac2 ~]$ ssh rac3-priv date
#需要达到不输入yes
配置ssh用户等效性
[root@rac3 tmp]# su - oracle
[oracle@rac3 ~]$ mkdir ~/.ssh
[oracle@rac3 ~]$ chmod 700 ~/.ssh
--使用如下命令生成用户身份认证秘钥
[oracle@rac3 ~]$ ssh-keygen -t rsa
--一路回车
[oracle@rac3 ~]$ ssh-keygen -t dsa
--一路回车
节点1:
[oracle@rac1 ~]$ ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac3:~/.ssh/
节点2:
[oracle@rac2 ~]$ ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
测试
节点3:
[oracle@rac3 ~]$ ssh rac1 date
[oracle@rac3 .ssh]$ ssh rac1-priv date
[oracle@rac3 ~]$ ssh rac2 date
[oracle@rac3 .ssh]$ ssh rac2-priv date
节点1:
[oracle@rac1 ~]$ ssh rac3 date
[oracle@rac1 ~]$ ssh rac3-priv date
节点2:
[oracle@rac2 ~]$ ssh rac3 date
[oracle@rac2 ~]$ ssh rac3-priv date
#需要达到不输入yes
版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/u_12991611/8751081,作者:Liujun_Deng,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。
上一篇:logstash之multiline插件,匹配多行日志
下一篇:Linux的文件系统组成