如何配置Linux的互信


如何配置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用戶呢?


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM