Using SSH key authentication

#ssh-keygen#ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

 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 | .. + Eo = ++. |
15 | . .oo + o * |
16 | . S o = ... |
17 | oo oo * = |
18 | . = O. |
19 | . The . |
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

 

Guess you like

Origin www.cnblogs.com/crossworld/p/11615330.html