第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 ...
随机推荐
- 算法笔记_159:算法提高 第二大整数(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 编写一个程序,读入一组整数(不超过20个),当用户输入0时,表示输入结束.然后程序将从这组整数中,把第二大的那个整数找出来,并把它打印出来 ...
- iOS_Xcode怎样准确定位到产生异常的出错代码
当应用程序出现异常而导致崩溃时, 可能光标仅仅提示异常出如今主函数代码处,例如以下图所看到的: 这样的情况下.即使看了日志. 也可能仍不清楚详细是哪一句代码产生了异常. 因此,须要手动设置异常断点. ...
- 尚学堂的一个用了ExtJs的页面代码
<html> <head> <meta http-equiv="Content-Type" content="tex ...
- input text 去掉标签下拉提示autocomplete
autocomplete 属性 autocomplete 属性规定输入字段是否应该启用自动完成功能. 自动完成允许浏览器预测对字段的输入.当用户在字段开始键入时,浏览器基于之前键入过的值,应该显示出在 ...
- 检查linux网络的状况
http://hi.baidu.com/dr_wang/blog/item/2952f7458659c306cefca3cc.html
- jq 遍历元素 筛选
var productInfo = $.grep(productData, function (value) { return value.productInfo.pId == favourite.p ...
- STL容器分析--list
就是一双向链表,可高效地进行插入删除元素.
- mysql-shell的安装和使用
mysql-shell是一个高级的mysql命令行工具.它直接两种模式(交互式&批处理式)三种语言(javascript\python\sql) 1.下载地址 https://dev.mysq ...
- 智能指针tr1::shared_ptr、boost::shared_ptr使用
对于tr1::shared_ptr在安装vs同一时候会自带安装,可是版本号较低的不存在.而boost作为tr1的实现品,包括 "Algorithms Broken Compiler Work ...
- Atitti. 语法树AST、后缀表达式、DAG、三地址代码
Atitti. 语法树AST.后缀表达式.DAG.三地址代码 抽象语法树的观点认为任何复杂的语句嵌套情况都可以借助于树的形式加以描述.确实,不得不承认应用抽象语法树可以使语句翻译变得相对容易,它很好地 ...