2023-07-22 22:02:33 +08:00
|
|
|
|
#cloud-config
|
2023-11-12 17:29:15 +08:00
|
|
|
|
datasource_list: [None]
|
2023-08-07 23:28:02 +08:00
|
|
|
|
timezone: Asia/Shanghai
|
2023-07-22 22:02:33 +08:00
|
|
|
|
disable_root: false
|
|
|
|
|
ssh_pwauth: true
|
|
|
|
|
users:
|
|
|
|
|
- name: root
|
|
|
|
|
lock_passwd: false
|
|
|
|
|
chpasswd:
|
|
|
|
|
expire: false
|
|
|
|
|
# 20.04 arm 需要
|
|
|
|
|
list: |
|
|
|
|
|
root:123@@@
|
|
|
|
|
users:
|
|
|
|
|
- name: root
|
|
|
|
|
password: 123@@@
|
|
|
|
|
type: text
|
|
|
|
|
runcmd:
|
2024-01-27 23:17:50 +08:00
|
|
|
|
# opensuse tumbleweed 有 /etc/ssh/sshd_config.d/ 文件夹,没有 /etc/ssh/sshd_config,有/usr/etc/ssh/sshd_config
|
2023-12-02 23:38:36 +08:00
|
|
|
|
- grep 'Include.*/etc/ssh/sshd_config.d' /etc/ssh/sshd_config && mkdir -p /etc/ssh/sshd_config.d && echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
|
2024-03-05 23:01:24 +08:00
|
|
|
|
- systemctl restart sshd || systemctl restart ssh
|
2023-09-10 22:23:05 +08:00
|
|
|
|
- touch /etc/cloud/cloud-init.disabled
|
2023-10-22 00:46:53 +08:00
|
|
|
|
# ubuntu 镜像运行 echo -e '\nDone' ,-e 会被显示出来
|
2024-02-01 01:02:35 +08:00
|
|
|
|
- printf '\n%s\n' 'reinstall done' >/dev/tty0 || true
|