File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 23
23
- [ Ubuntu 安装 VMware] ( Ubuntu-Install-VMware.md )
24
24
- [ VMware 克隆 CentOS 后网卡信息修改] ( CentOS-Virtual-Machine-Copy-Settings.md )
25
25
- [ Vim 安装、配置、快捷键列表] ( Vim-Install-And-Settings.md )
26
+ - [ SSH 免密登录] ( SSH-login-without-password.md )
26
27
- [ Bash 命令] ( Bash.md )
27
28
- [ Bash 其他常用命令] ( Bash-Other-Bash.md )
28
29
- [ Sed 命令] ( Sed.md )
78
79
- [ Alfresco 安装和使用] ( Alfresco-Install-And-Usage.md )
79
80
- [ Apache Thrift 安装和使用] ( Thrift-Install-And-Usage.md )
80
81
- [ Node.js 安装和使用] ( Node-Install-And-Usage.md )
82
+ - [ CI 整套服务安装和使用] ( CI-Install-And-Usage.md )
81
83
82
84
83
85
## 下一步(Next)
Original file line number Diff line number Diff line change
1
+ # SSH 免密登录
2
+
3
+ ## 环境说明
4
+
5
+ - CentOS 7.3
6
+
7
+ ## 关键点
8
+
9
+ - 免密登录的关键点在于理解谁登录谁。
10
+ - A 生成的公钥给 B,也给 C、D,则 A 可以直接免密 SSH 登录 B、C、D
11
+
12
+ ## A 生成密钥
13
+
14
+ - 命令:` ssh-keygen `
15
+ - 根据提示回车,共有三次交互提示,都回车即可。
16
+ - 生成的密钥目录在:** /root/.ssh**
17
+
18
+
19
+ ## 把 A 的公钥发给 B
20
+
21
+ - 假设 B 机器的 ip:` 192.168.1.105 `
22
+ - 则在 A 机器上输入:` ssh-copy-id -i /root/.ssh/id_rsa.pub -p 22 root@192.168.1.105 ` ,根据提示输入 B 机器的 root 密码,成功会有相应提示
23
+
24
+ ## 测试 A 免密登录到 B
25
+
26
+ - 在 A 机器上输入命令:` ssh -p 22 root@192.168.1.105 `
You can’t perform that action at this time.
0 commit comments