代码拉取完成,页面将自动刷新
# Create a Nova keypair. Nova generates keypair, retains the public key, and returns the private key.
nova keypair-add mykeypair > mykeypair.pem
# Change private key permissions
chmod 600 mykeypair.pem
# Boot an instance with injected public key
nova boot --image cirros --flavor m1.summit --key-name mykeypair mykeypairinstance
# View console-log
nova console-log mykeypairinstance
# Get VNC console
nova get-vnc-console mykeypairinstance novnc
# Open the URL in your browser.
# username: cirros
# password: cubswin:)
# From the instance, query the Metadata service.
# You should be able to see the injected public key.
curl 169.254.169.254/openstack/latest/meta_data.json
# View the contents of the authorized_keys file
cat /home/cirros/.ssh/authorized_keys
# Log out of instance
exit
######!!!From Your SSH Session!!!######
# Delete the instance
nova delete mykeypairinstance
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。