日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

配置Linux两节点SSH密钥信任

發布時間:2025/3/21 linux 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置Linux两节点SSH密钥信任 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

首先感謝兄弟“瑞瑞”提供資料

1. 生成兩節點Oracle用戶SSH密鑰

Racnode1

[root@racnode1 ~]#su - oracle--------------------->【無.ssh目錄】
[oracle@racnode1 ~]$ll -a
total 32K
drwxr
-xr-x 3 oracle oinstall 4.0K Jun 13 15:08 .kde
-rw-r--r-- 1 oracle oinstall 120 Jun 13 15:08 .gtkrc
-rw-r--r-- 1 oracle oinstall 124 Jun 13 15:08 .bashrc
-rw-r--r-- 1 oracle oinstall 191 Jun 13 15:08 .bash_profile
-rw-r--r-- 1 oracle oinstall 24 Jun 13 15:08 .bash_logout
drwxr
-xr-x 3 root root 4.0K Jun 13 15:08 ..
drwx
------ 3 oracle oinstall 4.0K Jun 13 15:08 .
[oracle
@racnode1 ~]$ssh-keygen -t rsa--------------------->【一路回車】
Generating public
/private rsa key pair.
Enter file
in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '
/home/oracle/.ssh'.
Enter passphrase (empty
for no passphrase):
Enter same passphrase again:
Your identification has been saved
in /home/oracle/.ssh/id_rsa.
Your public key has been saved
in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
8a:
11:ad:48:03:3b:94:b4:bb:a9:fb:b4:df:e1:18:87 oracle@racnode1
[oracle
@racnode1 ~]$ssh-keygen -t dsa--------------------->【一路回車】
Generating public
/private dsa key pair.
Enter file
in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty
for no passphrase):
Enter same passphrase again:
Your identification has been saved
in /home/oracle/.ssh/id_dsa.
Your public key has been saved
in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
7d:9e:de:
16:85:71:36:09:d3:9e:03:d2:1e:fd:d6:1a oracle@racnode1
[oracle
@racnode1 ~]$cat .ssh/*.pub > .ssh/authorized_keys
[oracle
@racnode1 ~]$ll -a--------------------->【生成.ssh目錄,密碼鑰也已生成】
total 20K
-rw-r--r-- 1 oracle oinstall 225 Jun 13 15:30 id_rsa.pub
-rw------- 1 oracle oinstall 883 Jun 13 15:30 id_rsa
-rw-r--r-- 1 oracle oinstall 605 Jun 13 15:30 id_dsa.pub
-rw------- 1 oracle oinstall 668 Jun 13 15:30 id_dsa
-rw-r--r-- 1 oracle oinstall 830 Jun 13 15:35 authorized_keys

Racnode2

[root@racnode2 ~]#su - oracle--------------------->【無.ssh目錄】
[oracle@racnode1 ~]$ll -a
total 32K
drwxr
-xr-x 3 oracle oinstall 4.0K Jun 13 15:08 .kde
-rw-r--r-- 1 oracle oinstall 120 Jun 13 15:08 .gtkrc
-rw-r--r-- 1 oracle oinstall 124 Jun 13 15:08 .bashrc
-rw-r--r-- 1 oracle oinstall 191 Jun 13 15:08 .bash_profile
-rw-r--r-- 1 oracle oinstall 24 Jun 13 15:08 .bash_logout
drwxr
-xr-x 3 root root 4.0K Jun 13 15:08 ..
drwx
------ 3 oracle oinstall 4.0K Jun 13 15:08 .
[oracle
@racnode2 ~]$ssh-keygen -t rsa--------------------->【一路回車】
Generating public
/private rsa key pair.
Enter file
in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '
/home/oracle/.ssh'.
Enter passphrase (empty
for no passphrase):
Enter same passphrase again:
Your identification has been saved
in /home/oracle/.ssh/id_rsa.
Your public key has been saved
in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
8a:
11:ad:48:03:3b:94:b4:bb:a9:fb:b4:df:e1:18:87 oracle@racnode1
[oracle
@racnode2 ~]$ssh-keygen -t dsa--------------------->【一路回車】
Generating public
/private dsa key pair.
Enter file
in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty
for no passphrase):
Enter same passphrase again:
Your identification has been saved
in /home/oracle/.ssh/id_dsa.
Your public key has been saved
in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
7d:9e:de:
16:85:71:36:09:d3:9e:03:d2:1e:fd:d6:1a oracle@racnode1
[oracle
@racnode2 ~]$cat .ssh/*.pub > .ssh/authorized_keys
[oracle
@racnode2 ~]$ll .ssh/--------------------->【生成.ssh目錄,密碼鑰也已生成】
total 20K
-rw-r--r-- 1 oracle oinstall 225 Jun 13 15:34 id_rsa.pub
-rw------- 1 oracle oinstall 883 Jun 13 15:34 id_rsa
-rw-r--r-- 1 oracle oinstall 605 Jun 13 15:34 id_dsa.pub
-rw------- 1 oracle oinstall 672 Jun 13 15:34 id_dsa
-rw-r--r-- 1 oracle oinstall 830 Jun 13 15:36 authorized_keys

2. 配置兩節點Oracle用戶SSH無密碼登陸的信任關系

Racnode1

[oracle@racnode1 ~]$scp .ssh/authorized_keys oracle@10.10.10.102:/home/oracle/.ssh/keys_dbs
The authenticity of host '
10.10.10.102 (10.10.10.102)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added '
10.10.10.102' (RSA) to the list of known hosts.
oracle
@10.10.10.102's password:RacNode2節點Oracle用戶的密碼
authorized_keys 100%? 830???? 0.8KB/s?? 00:00

Racnode2

[oracle@racnode2 ~]$cat .ssh/keys_dbs >> .ssh/authorized_keys
[oracle
@racnode2 ~]$scp .ssh/authorized_keys oracle@10.10.10.101:/home/oracle/.ssh/
The authenticity of host '
10.10.10.101 (10.10.10.101)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added '
10.10.10.101' (RSA) to the list of known hosts.
oracle
@10.10.10.101's password: RacNode1節點Oracle用戶的密碼
authorized_keys
100% 830 0.8KB/s 00:00

3. 配置兩節點Oracle用戶信任關系的測試

Racnode1

[oracle@racnode1 ~]$ssh racnode1
The authenticity of host 'racnode1 (
10.10.10.101)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Last login: Mon Jun
13 15:44:03 2011 from racnode1
[oracle
@racnode1 ~]$exit
logout
Connection to racnode1 closed.
[oracle
@racnode1 ~]$ssh racnode2
The authenticity of host 'racnode2 (
10.10.10.102)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Last login: Mon Jun
13 15:44:03 2011 from racnode1
[oracle
@racnode2 ~]$exit
logout
Connection to racnode1 closed.
[oracle
@racnode1 ~/.ssh]$ssh racnode1-priv
The authenticity of host 'racnode1
-priv (192.168.0.101)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode1
-priv,192.168.0.101' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:46:07 2011 from racnode1
[oracle
@racnode1 ~]$exit
logout
Connection to racnode1
-priv closed.
[oracle
@racnode1 ~/.ssh]$ssh racnode2-priv
The authenticity of host 'racnode2
-priv (192.168.0.102)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode2
-priv,192.168.0.102' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:46:59 2011 from racnode1
[oracle
@racnode2 ~]$exit
logout
Connection to racnode2
-priv closed.

Racnode2

[oracle@racnode2 ~]$ssh racnode1
The authenticity of host 'racnode1 (
10.10.10.101)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode1' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:49:14 2011 from racnode1-priv
[oracle
@racnode1 ~]$exit
logout
Connection to racnode1 closed.
[oracle
@racnode2 ~]$ssh racnode2
The authenticity of host 'racnode2 (
10.10.10.102)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode2,
10.10.10.102' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:49:28 2011 from racnode1-priv
[oracle
@racnode2 ~]$exit
logout
Connection to racnode2 closed.
[oracle
@racnode2 ~]$ssh racnode1-priv
The authenticity of host 'racnode1
-priv (192.168.0.101)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode1
-priv,192.168.0.101' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:49:56 2011 from racnode2
[oracle
@racnode1 ~]$exit
logout
Connection to racnode1
-priv closed.
[oracle
@racnode2 ~]$ssh racnode2-priv
The authenticity of host 'racnode2
-priv (192.168.0.102)' can't be established.
RSA key fingerprint is 3c:
84:f4:d9:d8:88:2d:9c:99:47:6a:21:1c:93:95:8d.
Are you sure you want to
continue connecting (yes/no)? yes
Warning: Permanently added 'racnode2
-priv,192.168.0.102' (RSA) to the list of known hosts.
Last login: Mon Jun
13 15:50:16 2011 from racnode2
[oracle
@racnode2 ~]$exit
logout
Connection to racnode2
-priv closed.



轉載于:https://www.cnblogs.com/qq78292959/archive/2011/06/15/2081696.html

總結

以上是生活随笔為你收集整理的配置Linux两节点SSH密钥信任的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 色综合久久久久 | 日韩av线 | 伊人青青 | 瑟瑟综合 | 四虎永久在线精品免费网址 | 人妻久久一区二区三区 | 亚洲精品无 | 午夜影院免费 | 韩国无码一区二区三区精品 | 岛国av免费看 | 国产区视频在线观看 | 国产乱码久久久 | 好吊在线视频 | 娇小萝被两个黑人用半米长 | 一级人爱视频 | 一区在线看 | 国产精品a级 | 天天躁夜夜躁av天天爽 | 高潮毛片无遮挡免费看 | 久久爱网| 日韩成人免费av | 深爱五月激情五月 | 色综合中文综合网 | 姝姝窝人体www聚色窝 | 欧美日韩在线一区二区 | 亚洲色图第三页 | a级免费网站 | 激情五月婷婷在线 | 日韩av无码一区二区三区不卡 | 国产一级生活片 | 久久国产露脸精品国产 | 丝袜脚交国产在线观看 | 懂色av蜜臂av粉嫩av | 大奶毛片 | 91久久久精品 | 欧美1314| 欧洲亚洲激情 | 国产网站久久 | 久久久久久久久久久久97 | 国产区一区二区 | 午夜激情福利在线 | 在线观看av的网址 | 精品乱码一区二区三四区视频 | 91视频最新| 男人天堂tv| 成人午夜视频免费 | 国产黄色一级片 | 老女人综合网 | 国模无码视频一区二区三区 | 亚洲自拍偷拍区 | jizz18欧美18 | 少妇高潮视频 | 免费的毛片网站 | 人人爽人人爽人人爽人人爽 | 99re在线精品视频 | 欧美精品在线看 | 久久这里只有精品久久 | 色综合天天综合 | 欧美视频在线免费看 | 日韩特级黄色片 | 无码任你躁久久久久久老妇 | 国产精品久久久久久99 | av伊人久久 | 国产一区二区精品在线 | 在线不卡日韩 | 久久五月婷 | 国产精美视频 | www.色在线观看 | 精品久久在线 | 男女激情四射网站 | 丁香六月色 | 极品尤物一区二区三区 | 久久亚洲精品小早川怜子 | 福利资源在线 | 不卡视频一区 | 美女视频黄是免费 | 久久人妻少妇嫩草av | 欧美日韩激情视频在线观看 | 性欧美视频在线观看 | 性色国产成人久久久精品 | 牛牛影视一区二区 | www国产91 | 色小姐com| 神马午夜久久 | 又污又黄的网站 | 成人精品在线观看 | 九九热精品在线观看 | 日韩黄色免费观看 | 色大师在线观看 | 2022av视频| 色资源网站 | 日韩两性视频 | a级片在线看 | www.国产欧美| 国产三级影院 | 无码国内精品人妻少妇蜜桃视频 | www.国产精品| 午夜av一区 | 国产性在线 |