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 方法進行訪問
最後更新:2017-04-03 12:55:09