简体   繁体   English

ubuntu,RHEL和任何云映像的登录密码

[英]Login password for ubuntu, RHEL, any cloud image

OpenStack cloud Images : OpenStack云映像

There are multiple cloud images which are available at https://docs.openstack.org/image-guide/obtain-images.html . https://docs.openstack.org/image-guide/obtain-images.html上有多个云映像。 In order to login to the VMs once those are deployed is either by using ssh key pair or password . 为了在VM部署后登录到VM,可以使用ssh key pairpassword But there are images where the sshkeypairlogin is disabled and there is no in-built password by default, then how to login to these VMs where the user have only information on the user-name 但是有些映像禁用了sshkeypairlogin ,默认情况下没有内置密码,然后如何登录到这些VM,其中用户仅拥有有关user-name

There are options to generate the password for the in-built users using cloud-init : 有一些选项可以使用cloud-init为内置用户生成密码:

Option-1 : Using OpenStack horizon 选项1使用OpenStack Horizo​​n

If the user is using horizon to launch the instance then for the post-configuration by providing the config as: 如果用户使用Horizo​​n启动实例,则通过提供以下配置来进行post-configuration

    #cloud-config
    chpasswd:
      list: |
        cloud-user:rhel
        root:rheladmin
      expire: False

Here the passwords are generated for cloud-user and root users of RHEL image. 在此,将为RHEL映像的cloud-userroot用户生成密码。 The same is used for any user of any image simply by replacing the user. 只需替换用户即可对任何图像的任何用户使用相同的功能。

Option-2 : Using OpenStack heat template 选项2使用OpenStack热模板

Using the openstack heat template by providing the user-data as below: 通过提供以下user-data来使用Openstack Heat模板:

heat_template_version: 2015-04-30

description: Launch the RHEL VM with a new password for cloud-user and root user

resources:
  rhel_instance:
    type: OS::Nova::Server
    properties:
      name: 'demo_instance'
      image: '15548f32-fe27-449b-9c7d-9a113ad33778'
      flavor: 'm1.medium'
      availability_zone: zone1
      key_name: 'key1'
      networks:
      - network: '731ba722-68ba-4423-9e5a-a7677d5bdd2d'
      user_data_format: RAW
      user_data: |
        #cloud-config
        chpasswd:
          list: |
            cloud-user:rhel
            root:rheladmin
          expire: False

Here the passwords are generated for cloud-user and root users of RHEL image. 在此,将为RHEL映像的cloud-userroot用户生成密码。 The same is used for any user of any image. 相同的用于任何图像的任何用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ubuntu Cloud 服务器镜像的登录凭据 - Login credentials of Ubuntu Cloud server image 无法在openstack给ubuntu云服务器映像提供的浮动ip上ssh - can not ssh on the floating ip given by openstack to the ubuntu cloud server image Salt-cloud使用什么密码或密钥登录新创建的OpenStack VM Minion? - What password or key does salt-cloud use to login to a newly created OpenStack VM minion? 我可以使用具有设置密码的任何自定义openstack centos映像吗? - any custom openstack centos image with a set password i can use? 如何登录部署在 Openstack 基础架构上的 ubuntu-cloud 实例 - How do I login on an ubuntu-cloud instance deployed on an Openstack infrastructure 使用 diskimage-builder 创建映像时缺少 ubuntu 用户(xenial 云映像作为基础) - ubuntu user is missing when creating an image with diskimage-builder (xenial cloud image as base) 我想在OpenStack云中启动Ubuntu实例时在哪里找到合适的映像? - Where do I find the appropriate image to use when I want to spin up a Ubuntu instance in an openstack cloud? 无法在任何组织注册。 在RHEL中注册系统 - Cannot register with any organization. Registering a system in RHEL 任何基于IaaS的云上的云不可知工具 - Cloud Agnostic Tool On Any IaaS Based Cloud .ova 官方 ubuntu openstack 用户名密码 - .ova oficial ubuntu openstack username password
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM