SSH Keys
SSH 密钥对可以让您方便的登录到 SSH 服务器,而无需输入密码。由于您无需发送您的密码到网络中,SSH 密钥对被认为是更加安全的方式。再加上使用密码短语 (passphrase) 的使用,安全性会更上一层楼。同时,我们可以使用 SSH agent 来帮助我们记住密码短语,无需我们记住没一个密钥对的密码短语,减轻了我们的负担。
我们可以使用 ssh-keygen 命令生成密钥对
$ ssh-keygen -t ecdsa -b 521 -C "$(whoami)@$(hostname)-$(date -I)"
Generating public/private ecdsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_ecdsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_ecdsa.
Your public key has been saved in /home/username/.ssh/id_ecdsa.pub.
The key fingerprint is:
dd:15:ee:24:20:14:11:01:b8:72:a2:0f:99:4c:79:7f username@localhost-2011-12-22
The key's randomart image is:
+-----+
| ..oB=. .|
| . . . . . |
|.. . +|
| oo.o . . = |
|o+.+. S . . .|
|=. . E |
| o . |
|. |
| |
+-----------------+
在上面这个例子中,ssh-keygen 生成了一对长度为 512 bit (-b 512) 的 ECDSA (-t ecdsa) 加密的密钥对,comment 为 -C "$(whoami)@$(hostname)-$(date -I)"。而 randomart image 是 OpenSSH 5.1 引入的一种简单的识别指纹 (fingerprint) 的图像。
...... please refer to the URL: https://wiki.archlinux.org/index.php/SSH_Keys_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) For Windows login to the remote system with SSH and key.Please refer to the following URL:
http://www.howtoforge.com/ssh_key_based_logins_putty_p2
页:
[1]