1. 生成本机的公私钥匙对
[oracle@Oracle11_2 scripts]$ ssh-keygen -b -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): (Enter)
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase): (Enter)
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: (Enter)
ab:a8::::f8::3f:f5:fd:c3:8b:::7b:e6 oracle@Oracle11_2
The key's randomart image is: (Enter)
+--[ RSA ]----+
| . |
|. . |
| o |
|+ . . |
| = . . .S |
| + . . .. |
| = .= . |
| o . .o.O |
| .o. . o*Eo |
+-----------------+ 2. 将本机的公钥复制到远程机器的authorized_keys文件中,ssh-copy-id也能让你有到远程机器的home, ~./ssh , 和 ~/.ssh/authorized_keys的权利
[oracle@Oracle11_2 scripts]$ ssh-copy-id -i ~/.ssh/id_rsa.pub Oracle11
The authenticity of host 'oracle11 (192.168.199.67)' can't be established.
RSA key fingerprint is ::e3:2c:5b::f2:a5::e0:2c::b9::dd:d6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'oracle11,192.168.199.67' (RSA) to the list of known hosts.
oracle@oracle11's password:
Now try logging into the machine, with "ssh 'Oracle11'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.

3. 测试
[oracle@Oracle11_2 scripts]$ ssh Oracle11
[oracle@Oracle11 ~]$ exit
logout
Connection to Oracle11 closed.

参考:http://blog.chinaunix.net/uid-26284395-id-2949145.html

http://blog.sina.com.cn/s/blog_68158ebf0100vf8l.html

快速创建SSH信任实现无密码登录的更多相关文章

  1. Linux创建SSH信任关系

    Linux服务器创建信任关系可以解决远程执行命令.远程传输文件多次手工输入的麻烦.可以实现环境一键打包备份. 测试环境 SuSE 手工创建 假设服务器A与B间要建立信任关系.用户想从服务器A免密码登录 ...

  2. 利用系统自带工具快速实现SSH免密远程登录

    一.软件环境 操作系统:CentOS Linux release 7.4.1708 (Core) SSH版本 [root@Geeklp201 ~]# ssh -V OpenSSH_7.4p1, Ope ...

  3. ssh 信任关系无密码登陆,清除公钥,批量脚本

    实验机器: 主机a:192.168.2.128 主机b:192.168.2.130 实验目标: 手动建立a到b的信任关系,实现在主机a通过 ssh 192.168.2.130不用输入密码远程登陆b主机 ...

  4. ssh配好无密码登录(RSA公钥)后,还要密码登录的问题的解决办法

    首先删除 /root/.ssh目录 然后ssh-keygen 生成新的认证目录 然后检查能否免密码登陆 如果还不能可能是/root/目录的权限不对了 可能被异常改到777了 做操作 chmod 650 ...

  5. 普通用户ssh无密码登录设置

    这段时间在做Hadoop的环境配置,用root用户只需要按照一定的步骤进行操作就可以直接实现无密码登录,但如果使用新建用户,怎么尝试都不行. 本帖大部分都是其他人帖子的内容.如果按照下面的步骤还是不能 ...

  6. 解决ssh无密码登录不成功的问题

    把ssh设置为无密码登录很简单,只需两步: 1.在本地创建公钥和私钥: ssh-keygen -t rsa 2.然后把公钥上传到远程机器上: ssh-copy-id -i ~/.ssh/id_rsa. ...

  7. Hadoop SSH+IP、SSH+别名 免密登录配置

    1.为什么要进行 SSH 无密码验证配置? Hadoop运行过程中需要管理远端Hadoop守护进程,在Hadoop启动以后,NameNode是通过SSH(Secure Shell)来启动和停止各个Da ...

  8. 批量部署ssh信任关系

    要求1:大批量部署SSH信任关系,在A文件分发服务器上大批量部署WEB层面信任关系文件分发服务器为:10.0.3.9 登录用户为:zhangsan WEB层IP段:10.0.3.10~10.0.3.6 ...

  9. 批量实现多台服务器之间ssh无密码登录的相互信任关系

    最近IDC上架了一批hadoop大数据业务服务器,由于集群环境需要在这些服务器之间实现ssh无密码登录的相互信任关系.具体的实现思路:在其中的任一台服务器上通过"ssh-keygen -t ...

随机推荐

  1. CSUOJ 1644 超能陆战队

    1644: 超能陆战队 Time Limit: 1 Sec  Memory Limit: 256 MBSubmit: 6  Solved: 1[Submit][Status][Web Board] D ...

  2. EularProject 48: 利用数组求和

    Problem 48 The series, 11+22+33+...+1010=10405071317. Find the last ten digits of the series, 11+22+ ...

  3. 在resin配置參数实现JConsole远程监控JVM

    在Resin配置參数实现JConsole远程监控JVM 在Resin中配置中配置下列參数,就能够是实现了! <jvm-arg>-Dcom.sun.management.jmxremote& ...

  4. OpenCASCADE Make Face With Holes

    OpenCASCADE Make Face With Holes eryar@163.com OpenCASCADE提供了构造Face的类BRepBuilderAPI_MakeFace,使用这个类可以 ...

  5. c++中重载、重写、覆盖的区别

    Overload(重载):在C++程序中,可以将语义.功能相似的几个函数用同一个名字表示,但参数或返回值不同(包括类型.顺序不同),即函数重载.(1)相同的范围(在同一个类中):(2)函数名字相同:( ...

  6. 59.C++与正则表达式

    regex_match 整个字符串是否匹配 (通过cmatch存储匹配的结果),match[0]代表整个匹配序列,match[1]代表第1个匹配后的子序列,match[2]代表第2个匹配后的子序列 代 ...

  7. 扩展: 简介pyinstaller: py文件压缩成exe文件

    写在开始: 后缀 .py 的文件, 必须在装有python解释器, 和相对应的模块下才能运行. 对于装13来说,比较不方便. 如果人家电脑上也装上了python解释器,  说不好一眼就看穿了 自己写的 ...

  8. 手机端使用rem的适配

    <html> <body> <!-- http://www.w3cfuns.com/notes/29143/79dafb7c07f6865f435af641869d312 ...

  9. Active Data Guard

    ADG INTRODUCE Active Data Guard(ADG)是ORACLE 11g企业版的新特性,需要单独的License.可以打开Physical standby至read only模式 ...

  10. Spring boot 解析jsp支持jsp热部署

    解析jsp并且支持jsp热部署 参考地址:https://www.wanpishe.top/detail?blogId=39875536-7d45-48ec-a7b5-f36b85c3a235