openstack 命令行管理十 - 密钥管理 (备忘)



帮助

[root@station140 ~(keystone_admin)]# nova help | grep key
    flavor-key          Set or unset extra_spec for a flavor.
    keypair-add         Create a new key pair for use with instances.
    keypair-delete      Delete keypair given by its name.
    keypair-list        Print a list of keypairs for a user
    keypair-show        Show details about the given keypair.

创建密钥方法 [ 略 ]

ssh-keygen 命令 (默认安装时候已经生成密钥)

添加密钥方法
[root@station140 ~(keystone_admin)]# nova keypair-add --pub-key /root/.ssh/id_rsa.pub terrykey

显示密钥方法
[root@station140 ~(keystone_admin)]# nova keypair-list
+----------+-------------------------------------------------+
| Name     | Fingerprint                                     |
+----------+-------------------------------------------------+
| terrykey | 94:b8:9c:2a:31:8c:2c:87:7f:f5:80:24:23:73:f8:e9 |
+----------+-------------------------------------------------+

密钥作用

当 instance 分配了浮动 IP 后, 允许 server 能够直接访问 instance 时候, 才可以利用密钥配对进行访问
假如通过 novnc 进行访问时候, 仍然需要通过 root/password 方法进行访问


你可能感兴趣的:(openstack 命令行管理十 - 密钥管理 (备忘))