SSH 使用密钥对认证

#ssh-keygen#ssh-copy-id -i ~/.ssh/id_rsa.pub sysadm01@192.168.1.2

 1 [risen@oc5800450712 ~]$ ssh-keygen
 2 Generating public/private rsa key pair.
 3 Enter file in which to save the key (/home/risen/.ssh/id_rsa): 
 4 Enter passphrase (empty for no passphrase): 
 5 Enter same passphrase again: 
 6 Your identification has been saved in /home/risen/.ssh/id_rsa.
 7 Your public key has been saved in /home/risen/.ssh/id_rsa.pub.
 8 The key fingerprint is:10 The key's randomart image is:
11 +---[RSA 2048]----+
12 |       ..+.+.oo=.|
13 |        =.=oo++.o|
14 |       ..+.o=Eo++|
15 |       . .oo +o *|
16 |      . S o o..=.|
17 |       o o = *o.o|
18 |      .   = = o. |
19 |         . o  .  |
20 |            ..   |
21 +----[SHA256]-----+
22 [risen@oc5800450712 ~]$ 
1 [risen@oc5800450712 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub sysadm01@192.168.1.2
1 ssh sysadm01@192.168.1.2

 

posted @ 2019-10-01 14:12  Cross+  阅读(366)  评论(0编辑  收藏  举报