Linux互通SSH免密码访问
来源:互联网 发布:人工智能框架 编辑:程序博客网 时间:2024/05/22 17:01
共三步:
一、生成一对密匙
二、发送密匙到其他机器上
比如有4台Linux机器需要互通SSH,则每台机器上需要执行下面红色指令3次(针对其余3台机器,指令中IP改成其他3台机器IP)。password处输入root用户密码
三、操作完毕,登陆检查。
一、以root用户执行下述命令:
[root@localhost .ssh]# /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
30:f6:d7:2a:ac:56:eb:3f:fa:40:25:8d:90:96:68:cb root@localhost.localdomain
该命令将在用户的主目录/.ssh目录下面产生一对密钥
一般采用的ssh的rsa密钥:
id_rsa 私钥
id_rsa.pub 公钥
二、[root@localhost .ssh]# scp /root/.ssh/id_rsa.pub root@172.16.142.5:/root/.ssh/authorized_keys
The authenticity of host '172.16.142.5 (172.16.142.5)' can't be established.
RSA key fingerprint is 4b:a5:74:fb:2e:08:60:af:fa:76:d4:b0:26:4c:13:75.
Are you sure you want to continue connecting (yes/no)?yes
Warning: Permanently added '172.16.142.5' (RSA) to the list of known hosts.
root@172.16.142.5's password:
id_rsa.pub
三、[root@localhost .ssh]# ssh 172.16.142.5
root@172.16.142.5's password:
- Linux互通SSH免密码访问
- Centos SSH 免密码互通
- ssh免密码访问
- 配置linux服务器之间ssh免密码访问
- 【linux】SSH免密码登录
- linux ssh 免密码登录
- linux ssh免密码登录
- Linux SSH免密码登录
- Linux SSH免密码登录
- Linux SSH 免密码登录
- linux ssh 免密码登陆
- Linux SSH免密码登陆
- linux ssh 免密码登录
- linux ssh 免密码登陆
- [Linux]ssh免密码登陆
- linux ssh 免密码登陆
- linux ssh免密码登陆
- Linux ssh 免密码登陆
- 如何在spring mvc中上传图片并显示出来
- 布局篇(一)各类元素居中显示
- 写给自己的逗比翻身计划
- 信道复用
- 3、C语言和设计模式(之单件模式)
- Linux互通SSH免密码访问
- 空格还是Tab
- Python String和PyQt QString的区别(转)
- twisted搭建ftp server
- dom4j解析XML之【增删改查】
- db2 实现oracle wm_concat函数的方法-db2开发系列(一)
- tomcat配置文件server.xml详解
- SQLite with readline support on Ubuntu
- hdu-5318 The Goddess Of The Moon(2015 Multi-University Training Contest 3)