Solaris ssh配置主机间信任关系
2024-10-10 23:18:26
假设需要配置从主机com00biiitf001登录主机ols00biiitf001时不需要密码,则采用以下步骤配置:
com00biiitf001上产生公用/私有密钥对
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/jyu/.ssh/id_rsa):
Created directory '/export/home/jyu/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/jyu/.ssh/id_rsa.
Your public key has been saved in /export/home/jyu/.ssh/id_rsa.pub.
The key fingerprint is:
b0:89:f6:e5:4c:43:f1:9b:c4:ac:a7:d8:1d:98:67:4d jyu@com00biiitf001
在ols00biiitf001上建立.ssh目录
$ mkdir -p $HOME/.ssh
$ chmod 700 $HOME/.ssh
$ touch $HOME/.ssh/authorized_keys
$ chmod 600 $HOME/.ssh/authorized_keys
把com00biiitf001的公钥传到ols00biiitf001上
$ cat $HOME/.ssh/id_rsa.pub | ssh ols00biiitf001 'cat >> .ssh/authorized_keys && echo "Key uploaded successfully"'
The authenticity of host 'ols00biiitf001 (10.0.17.20)' can't be established.
RSA key fingerprint is 96:f2:60:e1:22:c8:54:ad:35:9c:3e:d1:51:a0:73:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ols00biiitf001,10.0.17.20' (RSA) to the list of known hosts.
|-----------------------------------------------------------------|
| This system is for the use of authorized users only. |
| Individuals using this computer system without authority, or in |
| excess of their authority, are subject to having all of their |
| activities on this system monitored and recorded by system |
| personnel. |
| |
| In the course of monitoring individuals improperly using this |
| system, or in the course of system maintenance, the activities |
| of authorized users may also be monitored. |
| |
| Anyone using this system expressly consents to such monitoring |
| and is advised that if such monitoring reveals possible |
| evidence of criminal activity, system personnel may provide the |
| evidence of such monitoring to law enforcement officials. |
|-----------------------------------------------------------------|
Password:
Key uploaded successfully
现在就可以从com00biiitf001直接登录到ols00biiitf001上
$ ssh jyu@ols00biiitf001
最新文章
- 著名的sql注入问题-问题的原因分析及总结
- 关于语句#ifdef OS_GLOBALS #define OS_EXT #else #define OS_EXT extern #endif 的说明
- Handler ";BlockViewHandler"; has a bad module ";ManagedPipelineHandler"; in its module list
- python 读写文件
- PHP 文件创建/写入
- Django笔记-MySQL初次使用设置
- 重新安装python
- 改变WPF ListBoxItem的选中样式
- poj2186 Popular Cows(强连通)
- Java文件操作 读写操作
- 35个jQuery小技巧!
- 利用泛型抽取Dao层,加事务注解问题(java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType)
- 查看java线程cpu占用情况的脚本
- Redis进阶实践之十九 Redis如何使用lua脚本
- JS基础速成(三)- DOM(文件对象模型)
- 一致性哈希算法----nginx负载均衡器配置之一
- GraphQL:你的容颜,十万光年
- day13 生成器 三元运算 列表解析
- POJ.2891.Strange Way to Express Integers(扩展CRT)
- Spark log4j日志配置详解(转载)
热门文章
- javascript 时间日期处理相加相减
- Spring初学之spring的事务管理注解
- PyCharm 的初始设置2 - 打开、新建项目
- 数据库排序规则的冲突(理解collate Chinese_PRC_CI_AS)
- 《Advanced Bash-scripting Guide》学习(十二):占位符";:";及其他
- DataTable的用法
- 一文搞定 Git 相关概念和常用指令
- C#面向对象(四):其他面向对象知识
- [独孤九剑]Oracle知识点梳理(九)数据库常用对象之package
- 六、python沉淀之路--int str list tuple dict 重点总结