From ec6227a0f9073414a19d5230ae5add83eca12157 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sat, 2 Dec 2023 23:38:36 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E6=9C=AA=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E8=AF=86=E5=88=AB=20sshd=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloud-init.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-init.yaml b/cloud-init.yaml index faacaee..0c88953 100644 --- a/cloud-init.yaml +++ b/cloud-init.yaml @@ -18,7 +18,7 @@ chpasswd: runcmd: # arch 没有 /etc/ssh/sshd_config.d/ 文件夹 # opensuse tumbleweed 有 /etc/ssh/sshd_config.d/ 文件夹,但没有 /etc/ssh/sshd_config,但有/usr/etc/ssh/sshd_config - - grep 'Include.*/etc/ssh/sshd_config.d' /etc/sshd_config && echo "PermitRootLogin yes" >/etc/ssh/sshd_config.d/01-permitrootlogin.conf || echo "PermitRootLogin yes" >>/etc/ssh/sshd_config + - 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 - systemctl restart sshd - touch /etc/cloud/cloud-init.disabled # ubuntu 镜像运行 echo -e '\nDone' ,-e 会被显示出来