第5步:建立主机间的信任关系(sgdb1、sgdb2)
| [root@sgdb1 /]# su - oracle
[oracle@sgdb1 ~]$ mkdir .ssh 创建一个.ssh的隐藏目录
[oracle@sgdb1 ~]$ ls -al
total 44
-rw-r--r-- 1 oracle oinstall 33 Jul 12 17:05 .bash_logout
-rw-r--r-- 1 oracle oinstall 438 Jul 12 18:03 .bash_profile
drwxr-xr-x 4 oracle oinstall 4096 Jul 1217:05 .mozilla
drwx------ 2 oracle oinstall 4096 Jul 1218:05 .ssh
-rw------- 1 oracle oinstall 657 Jul 12 18:03 .viminfo
|
| [oracle@sgdb1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for nopassphrase): enter
Enter same passphrase again: enter
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:
64:a6:4a:77:db:33:a4:aa:6e:ca:8f:5f:2f:77:0f:40oracle@sgdb1
|
| [oracle@sgdb1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_dsa): enter
Enter passphrase (empty for no passphrase):enter
Enter same passphrase again: enter
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:
7c:41:b5:0f:81:06:ad:30:07:4f:8b:1a:9b:94:68:14oracle@sgdb1
|
| [oracle@sgdb2 asm]# su - oracle
[oracle@sgdb2 ~]$ mkdir .ssh
[oracle@sgdb2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for nopassphrase): enter
Enter same passphrase again: enter
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:
64:a6:4a:77:db:33:a4:aa:6e:ca:8f:5f:2f:77:0f:40oracle@sgdb1
|
| [oracle@sgdb2 ~]$ ssh-keygen -tdsa
Generatingpublic/private dsa key pair.
Enter file inwhich to save the key (/home/oracle/.ssh/id_dsa): enter
Enter passphrase(empty for no passphrase): enter
Enter samepassphrase again: enter
Youridentification has been saved in /home/oracle/.ssh/id_dsa.
Your public keyhas been saved in /home/oracle/.ssh/id_dsa.pub.
The keyfingerprint is:
7c:41:b5:0f:81:06:ad:30:07:4f:8b:1a:9b:94:68:14oracle@sgdb1
|
| [oracle@sgdb1 ~]$ ls .ssh
id_dsa id_rsa id_dsa.pub id_rsa.pub
[oracle@sgdb1 ~]$ cat.ssh/id_rsa.pub >>.ssh/authorized_keys
[oracle@sgdb1 ~]$ cat.ssh/id_dsa.pub >>.ssh/authorized_keys
[oracle@sgdb1 ~]$ ssh sgdb2 cat .ssh/id_rsa.pub>>.ssh/authorized_keys
oracle@sgdb2's password:
[oracle@sgdb1 ~]$ ssh sgdb2 cat .ssh/id_dsa.pub>>.ssh/authorized_keys
oracle@sgdb2's password: oracle的密码
|
| [oracle@sgdb1 ~]$ scp.ssh/authorized_keys sgdb2:~/.ssh
oracle@sgdb2's password: oracle的密码
|
| [oracle@sgdb1 ~]$ ssh sgdb2 date
[oracle@sgdb1 ~]$ ssh sgdb 2-privdate //私有ip地址验证
[oracle@sgdb1 ~]$ ssh sgdb 1date
[oracle@sgdb1 ~]$ ssh sgdb 1-privdate
|
| [oracle@sgdb2 ~]$ ssh sgdb1 date
[oracle@sgdb2~]$ ssh sgdb 1-priv date
[oracle@sgdb2 ~]$ ssh sgdb2 date
[oracle@sgdb2~]$ ssh sgdb2-priv date
|
| [root@sgdb1 /]# su– grid
[grid@sgdb1 ~]$mkdir .ssh 创建一个.ssh的隐藏目录
[grid@sgdb1 ~]$ ls-al
|
| [grid@sgdb1 ~]$ ssh-keygen-t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for no passphrase): enter
Enter same passphrase again: enter
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:
64:a6:4a:77:db:33:a4:aa:6e:ca:8f:5f:2f:77:0f:40oracle@sgdb1
|
| [grid@sgdb1 ~]$ ssh-keygen-t dsa
Generating public/private dsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_dsa): enter
Enter passphrase (empty for no passphrase): enter
Enter same passphrase again: enter
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:
7c:41:b5:0f:81:06:ad:30:07:4f:8b:1a:9b:94:68:14oracle@sgdb1
|
| [root@sgdb2 ~]# su – grid
[grid@sgdb2 ~]$ mkdir .ssh
[grid@sgdb2 ~]$ ssh-keygen-t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for no passphrase): enter
Enter same passphrase again: enter
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:
64:a6:4a:77:db:33:a4:aa:6e:ca:8f:5f:2f:77:0f:40oracle@sgdb1
|
| [grid@sgdb2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_dsa): enter
Enter passphrase (empty for no passphrase): enter
Enter same passphrase again: enter
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:
7c:41:b5:0f:81:06:ad:30:07:4f:8b:1a:9b:94:68:14oracle@sgdb1
|
| [grid@sgdb1 ~]$ ls .ssh
id_dsa id_rsa id_dsa.pub id_rsa.pub known_hosts
[grid@sgdb1 ~]$ cat.ssh/id_rsa.pub >>.ssh/authorized_keys
[grid@sgdb1 ~]$ cat.ssh/id_dsa.pub >>.ssh/authorized_keys
[grid@sgdb1 ~]$ ssh sgdb2 cat .ssh/id_rsa.pub>>.ssh/authorized_keys
grid@sgdb2's password:
[grid@sgdb1 ~]$ ssh sgdb2 cat .ssh/id_dsa.pub >>.ssh/authorized_keys
grid@sgdb2's password: grid的密码
|
| [grid@sgdb1 ~]$ scp.ssh/authorized_keys sgdb2:~/.ssh
grid@sgdb2's password: grid的密码
authorized_keys 100% 1992 2.0KB/s 00:00
|
| [grid@sgdb1 ~]$ ssh sgdb2 date
[grid@sgdb1 ~]$ ssh sgdb2-priv date
[grid@sgdb1 ~]$ ssh sgdb1 date
[grid@sgdb1 ~]$ ssh sgdb 1-priv date
|
| [grid@sgdb2 ~]$ ssh sgdb1 date
[grid@sgdb2~]$ ssh sgdb1-priv date
[grid@sgdb2 ~]$ ssh sgdb2 date
[grid@sgdb2~]$ ssh sgdb2-priv date
|
第5步:建立主机间的信任关系(sgdb1、sgdb2)的更多相关文章
- Solaris主机间的信任关系机制
解决问题: 管理员经常在其他服务器之间登录,是否需要密码切换. 知识点:主机间信任关系.R 命令集 /etc/hosts/equiv 文件 R服务是不加密的,别人可以破解. 主机名 + 用户名. + ...
- Android手机与计算机间的”信任关系”
在iDevices(如iPhone.iPad等等)的取证方面,那个代表”信任关系”的plist无疑是最为关键的迹证,只要有了它,哪怕是最新机型的iDevice及最新版的iOS,且有着指纹保护或pass ...
- [域|Domain] The trust relationship between this workstation and the primary domain failed 此工作站和主域间的信任关系失败
PS> $cred = Get-Credential domain.sample.com;Reset-ComputerMachinePassword -Credential $cred -Ser ...
- ssh两台机器建立信任关系无密码登陆
在建立信任关系之前先看看基于公钥.私钥的加密和认证. 私钥签名过程 消息-->[私钥]-->签名-->[公钥]-->认证 私钥数字签名,公钥验证 Alice生成公钥和私钥,并将 ...
- centos下建立双机信任关系
在有些情况下,我们希望在两台centos机器之间建立ssh连接的时候,可以不用输入密码.最常见的情况就是在使用脚本做数据库备份的时候.这种情况下,我们可以通过公钥/私钥来建立双机之间的信任关系. 网上 ...
- 【Linux学习笔记】用nc实现两台主机间的文件传输(不需要输密码)
通常,可以用scp完成两台主机间的文件传输任务,但在主机间未建立信任关系的情况下,scp每次都需要输入密码,用起来感觉不是很方便,之前这篇笔记介绍过不用输入密码执行脚本或传输文件的方法,但对于一些临时 ...
- linux机器间建立信任关系
linux机器间建立信任关系 如何建立信任关系 在shell脚本中,需要使用scp命令将本地的文件复制到另一台机器中备份.但通常执行scp命令后都需要输入用户密码,这样在定时自动执行shell脚本中就 ...
- linux建立信任关系
(1).切换到需要建立信任关系的用户(2).执行命令:ssh-keygen -d,然后一直回车.该命令会在用户home目录下生成一个隐藏的.ssh目录.目录里面有两个文件:id_dsa.id_dsa ...
- 建立SSH的信任关系
1.在Client上root用户执行ssh-keygen命令,生成建立安全信任关系的证书. Client端 # ssh-keygen -t rsa Generating public/private ...
随机推荐
- 算法笔记_075:蓝桥杯练习 最短路(Java)
目录 1 问题描述 2 解决方案 2.1 floyd算法解决 2.2 spfa算法解决 1 问题描述 问题描述 给定一个n个顶点,m条边的有向图(其中某些边权可能为负,但保证没有负环).请你计算从 ...
- mysql 严格模式取消 group by 和 date zore
取消单个库的时间严格模式 set global sql_mode=(select replace(@@sql_mode,'NO_ZERO_IN_DATE,NO_ZERO_DATE',''));
- angular 禁止事件冒泡 和 默认行为
事件冒泡和事件捕捉一直以来都是被讨论的话题,也许大家平时在工作中没有遇到过需要解决事件冒泡的情况举个例子: <body ng-click="fun1()"> <d ...
- C语言之基本算法08—去掉最高分去掉最低分求平均值
// /* ================================================================== 题目:选拔赛中通经常使用这种办法求选手分数,去掉一个最 ...
- ionic build android log
RubertdeMacBook-Pro:~ Rubert$ ionic build android Current working directory is not a Cordova-based p ...
- Vue基础及脚手架环境搭建
From:http://www.jianshu.com/p/dc5057e7ad0d 一.vue基础 “Vue2.0”跟俺一起全面入坑 01 “Vue2.0”跟俺一起全面入坑 02 “Vue2.0”跟 ...
- Samba Server possible problem and solving
Configured samba server at RHEL7, problem encountered and solved. 1, yum install samba*, RHEL7 syste ...
- Lintcode---区间最小数
给定一个整数数组(下标由 0 到 n-1,其中 n 表示数组的规模),以及一个查询列表.每一个查询列表有两个整数 [start, end]. 对于每个查询,计算出数组中从下标 start 到 end ...
- python打包exe文件-ImportError: No module named 'queue'
我之前遇到的一个错误就是 File "site-packages\urllib3\packages\six.py", line 92, in __get__ File " ...
- jquery的onclick(this)方法
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...