Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="default-cloud-config.yaml"
Merge-Type: dict(recurse_array)+list(append)+str()
#cloud-config
chpasswd:
expire: false
users:
- name: root
password: $2y$10$yi6mRCLMrlheMAOv5pzUvOHBLYhRkKZ.FeAJpsfpPfqcHa1XOXyAW
type: hash
ssh_pwauth: True
disable_root: False
runcmd:
- grep -q "^PermitRootLogin" /etc/ssh/sshd_config && sed -i 's/^PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config || echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "" >> /etc/ssh/sshd_config
- systemctl restart ssh.service || systemctl restart sshd.service
--//