[root@centos ~]# ssh-keygen
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
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:
8f:8d:89:3b:3b:ed:80:48:a6:d5:e1:56:b2:ce:e0:0c root@centos
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| o . |
| o = |
|E = = S |
| O * . . * |
|. + + o.+ o |
| oo. |
| o=. |
+-----------------+
[root@centos ~]#
[root@centos ~]#
[root@centos ~]#
[root@centos ~]#
[root@centos ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.11
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompt ed now it is to install the new keys
root@192.168.1.11's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.1.11'"
and check to make sure that only the key(s) you wanted were added.
[root@centos ~]# ssh 192.168.1.11
Last login: Tue Jun 21 22:04:45 2016 from 192.168.1.21
[root@fedora24 ~]#
Brak komentarzy:
Prześlij komentarz