$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/beyes/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/beyes/.ssh/id_rsa.
Your public key has been saved in /home/beyes/.ssh/id_rsa.pub.
The key fingerprint is:
c7:a7:08:3c:97:bb:af:96:04:80:35:7c:26:4e:91:73 beyes@beyes-desktop
The key's randomart image is:
+--[ RSA 2048]----+
| ++o |
| . B.E |
| o B |
| ... o |
| +.S o . |
| +.+ o |
| .o.. |
| o. |
| .oo. |
+-----------------+
Your public key has been saved in /home/beyes/.ssh/id_rsa.pub.
Your identification has been saved in /home/beyes/.ssh/id_rsa.
$ ssh-copy-id -i .ssh/id_rsa.pub beyes@centos
beyes@centos's password:
Now try logging into the machine, with "ssh 'beyes@centos'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
RSAAuthentication yes
PubkeyAuthentication yes
#/etc/init.d/sshd restart
Agent admitted failure to sign using the key
$ssh-add id_rsa
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |