如何配置Linux的互信?
这里针对的是root用户的,普通用户家目录/home/test/.ssh。
1、在客户端生成公钥私钥对
[root@auto1 ~]# ssh-keygen -t rsa
2、查看生成的公钥私钥对
[root@auto1 ~]# ls /root/.ssh/ id_rsa id_rsa.pub
3、配置互信,将当前id_rsa.pub 的值存入互信ip的authorized_keys文件中
[root@auto1 .ssh]# cat /root/.ssh/id_rsa.pub >/root/.ssh/authorized_keys
4、将authorized_keys文件要免钥远程的那台机器的/root/.ssh/
[root@auto1 ~]# scp /root/.ssh/authorized_keys 192.168.23.103:/root/.ssh/
5、验证互信(第一次需要yes)
[root@auto1 etc]# ssh auto3.example.com The authenticity of host 'auto3.example.com (192.168.23.103)' can't be established. RSA key fingerprint is 66:61:bb:34:dc:d9:f1:bd:a0:02:ef:cb:3c:a4:d3:16. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'auto3.example.com,192.168.23.103' (RSA) to the list of known hosts. Last login: Tue Aug 18 07:39:43 2020 from 192.168.23.199 [root@auto3 ~]#
6、问题
①如何从auto3.example.com免密连接到auto1.example.com呢?
②如何从auto1.example.com的Oracle用户免密连接到auto3.example.com的Oracle用户呢?