From cfa6b75bad262816fdd7cf349fa3934ced5153d6 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Sat, 30 Sep 2023 06:24:54 +0900 Subject: [PATCH] Update ipv4_static_interfaces.cfg --- Linux_reinstall/Ubuntu/CloudInit/ipv4_static_interfaces.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_interfaces.cfg b/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_interfaces.cfg index ef2b7fd..1646092 100644 --- a/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_interfaces.cfg +++ b/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_interfaces.cfg @@ -60,7 +60,7 @@ network: addresses: [ipDNS1, ipDNS2] # later commands -# Replace ssh port, permit root user login by password, enable sshd service. +# Replace ssh port, enable sshd service. # Disable kernel need to restart: https://askubuntu.com/questions/1349884/how-to-disable-pending-kernel-upgrade-message # Install some common components. # Configure vim for more convenient to use. @@ -69,8 +69,6 @@ network: # Delete cloud-init config file itself and disable it permanently after first execution. runcmd: - sed -ri 's/^#?Port.*/Port sshPORT/g' /etc/ssh/sshd_config - - sed -ri 's/^#?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config - - sed -ri 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config - update-rc.d ssh enable - ssh-keygen -A - /etc/init.d/ssh restart