in the on Linux clients Build ssh keys for RSA
Id_rsa is the key
Id_rsa.pub is the public key
[email protected]xuegod128~]# 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:
e2:19:f2:b4:e3:90:b6:36:08:70:1c:1d:2d:67:53:16 [email protected] localhost . CN
The key ' s Randomart image is:
+--[RSA 2048]----+
| .. O. E. |
| . o =. |
| . . + . |
|. o |
|.. . + S |
|. * = |
| . .+ * |
| .. o+. |
| .... |
+-----------------+
Then send the client public key to the Linux server (192.168.31.129)
[Email protected] ~]# ssh-copy-id-i/root/.ssh/id_rsa.pub 192.168.31.129
[email protected] ' s password:
Now try logging to the machine, with "ssh ' 192.168.31.129 '", and check in:
. Ssh/authorized_keys
To make sure we haven ' t added extra keys so you weren ' t expecting.
Test Client logon Status
[[email protected] ~]# ssh 192.168.31.129
Last Login:sun Jan 23:23:07 from 192.168.31.188
[[Email protected] ~]# exit
Logout
Connection to 192.168.31.129 closed.
[Email protected] ~]#
Complete!!!
This article is from the "︵ rice 愺 incompatible materials oxidizing ☆" blog, please be sure to keep this source http://linxm.blog.51cto.com/10966682/1738105
SSH key authentication for Linux systems