使用 ssh-keygen 设置 ssh 无密码登录
ssh 是一个专为远程登录会话和其他网络服务提供安全性的协议。
默认状态下 ssh 链接是需要密码认证的,可以通过添加系统认证(即
公钥-私钥)的修改,修改后系统间切换可以避免密码输入和 ssh 认证。
以下将创建过程简单介绍下。
一、用 ssh-keygen 创建公钥
haifeng@haifeng-EX38-DS4:/$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter #le in which to save the key (/home/haifeng/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identi#cation has been saved in /home/haifeng/.ssh/id_rsa.
Your public key has been saved in /home/haifeng/.ssh/id_rsa.pub.
The key #ngerprint is:
7b:75:98:eb:fd:13:ce:0f:c4:cf:2c:65:cc:73:70:53 haifeng@haifeng-
EX38-DS4
The key's randomart image is:
+--[ RSA 2048]----+
| E|
| .|
| ...|
| + =.|
| S + +.*|
| . . + Bo|
| . . . = =|
| . . . * |
| . ..=|
+-----------------+
评论0
最新资源