生成ssh key

请在终端执行ssh-keygen命令,一路回车

$ ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/work/.ssh/id_rsa): <回车>
Created directory '/home/work/.ssh'.
Enter passphrase (empty for no passphrase): <回车>
Enter same passphrase again: <回车>
Your identification has been saved in /home/work/.ssh/id_rsa.
Your public key has been saved in /home/work/.ssh/id_rsa.pub.
The key fingerprint is:
c7:31:ed:16:cb:f3:42:0f:03:39:3e:b5:1e:21:b2:34 work@xiaoqi-OptiPlex-380
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|           o     |
|        E B =    |
|       . * X =   |
|        S = %    |
|         . = B   |
|            o o  |
|             .   |
|                 |
+-----------------+
$

此时ssh key已经生成,并保存在用户主目录.ssh目录下(此为隐藏目录)

Note: 注意在提示“Enter passphrase”,请直接回车,不要输入任何密码
posted @ 2014-04-23 09:49  camera&tunning  阅读(407)  评论(0编辑  收藏  举报