1 Star 0 Fork 0

aaawoyucheng / cloud-init-guide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
03-keypairs.txt 889 Bytes
一键复制 编辑 原始数据 按行查看 历史
Matt Dorn 提交于 2016-04-27 03:43 . initial commit
# 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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aaawoyucheng/cloud-init-guide.git
git@gitee.com:aaawoyucheng/cloud-init-guide.git
aaawoyucheng
cloud-init-guide
cloud-init-guide
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891