分享

【已解决】ssh-keygen密码。

marsaber 发表于 2015-1-15 12:20:24 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 12943
本帖最后由 marsaber 于 2015-1-15 13:33 编辑

ssh-keygen需要输入一个密码,用哪个密码?demo的密码吗?还是任意设置一个密码?


icehouse官方文档:
Launch an instance with OpenStack Networking(neutron)
To generate a keypair
Most cloud images support public key authentication rather than conventional username/password authentication. Before launching an instance, you must generate a public/private key pair using ssh-keygen and add the public key to your OpenStack environment.

1. Source the demo tenant credentials:
$ source demo-openrc.sh
-----------------
export OS_USERNAME=demo
export OS_PASSWORD=demotest
export OS_TENANT_NAME=demo
export OS_AUTH_URL=http://controller:35357/v2.0

-----------------

2. Generate a key pair:
$ ssh-keygen
--------------------
[root@controller ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
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:
1f:73:9d:f3:bb:37:29:6f:59:3b:ba:67:d3:6b:2d:10 root@controller
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|            E. . |
|        S o ..+  |
|         . +.  o.|
|          .  .  O|
|             ..%=|
|             oX*B|
+-----------------+
[root@controller ~]#
--------------------

3. Add the public key to your OpenStack environment:
$ nova keypair-add --pub-key ~/.ssh/id_rsa.pub demo-key
Note
  This command provides no output.
4. Verify addition of the public key:
$ nova keypair-list
+----------+-------------------------------------------------+
| Name     | Fingerprint                                     |
+----------+-------------------------------------------------+
| demo-key | 6c:74:ec:3a:08:05:4e:9e:21:22:a6:dd:b2:62:b8:28 |
+----------+-------------------------------------------------+

已有(3)人评论

跳转到指定楼层
stark_summer 发表于 2015-1-15 12:57:38
主机登陆密码
回复

使用道具 举报

starrycheng 发表于 2015-1-15 13:00:45
这个密码可以自己设置,
可以主机密码,可以为空,一路回车也是可行的。
回复

使用道具 举报

marsaber 发表于 2015-1-15 13:29:57
starrycheng 发表于 2015-1-15 13:00
这个密码可以自己设置,
可以主机密码,可以为空,一路回车也是可行的。

谢谢,我设置空密码吧。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条