Host 1 : 172.16.222.88 [[Email protected] ~]
Host 2 : 172.16.198.23 [Email protected]:~#
[[email protected] ~]# ssh-keygen-t RSA = = = "in the host 1 to generate the key file
Generating public/private RSA key pair.
Enter file in which to save the key (/ROOT/.SSH/ID_RSA):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y = = = = = è overwrite the original file, if it is the first time it will not appear this
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:
35:8a:19:96:f5:1a:80:04:25:04:e0:66:48:fe:bc:[email protected]
The key ' s Randomart image is:
+--[RSA 2048]----+
|++++o. . |
|= .. + . |
|. = + . + |
|o O. + = . |
| o O S |
| .. |
| E O |
| . |
| |
+-----------------+
[email protected] ~]#
Scp/root/.ssh/id_rsa.pub [email protected]:/root/.ssh/authorized_keys
======= "in the host 1 To upload the generated public key to the host 2 and rename it.
[email protected] ' spassword: = = = = = = "Enter the host 2 password to upload the public key
Id_rsa.pub
100% 408 0.4kb/s 00:00
[email protected] ~]# ssh172.16.198.23 ===== "in the host 1 on the pass SSH Login Host 2
Linux kali64 3.18.0-kali3-amd64#1 SMP Debian 3.18.6-1~kali2 (2015-03-02) x86_64
The programs included with the Kalignu/linux system is free software;
The exact distribution terms for Eachprogram is described in the
Individual files In/usr/share/doc/*/copyright.
Kali Gnu/linux comes with absolutely nowarranty, to the extent
permitted by applicable.
Last Login:tue Jul 22:45:24 from172.16.222.88
[email protected]:~# ===== you can sign in without entering a password.
If you want to let the host 2 Enter password-free login host 1 , according to this
This article is from the "three degree" blog, be sure to keep this source http://6207455.blog.51cto.com/6197455/1674801
Password-free login to a remote Linux host via SSH