From 32db512a7dfe4f8d8e694ba90a6fee9e90f5fa08 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Thu, 31 Aug 2023 19:21:36 +0900 Subject: [PATCH] Update dhcp_interfaces.cfg --- Linux_reinstall/Ubuntu/CloudInit/dhcp_interfaces.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/Linux_reinstall/Ubuntu/CloudInit/dhcp_interfaces.cfg b/Linux_reinstall/Ubuntu/CloudInit/dhcp_interfaces.cfg index 3de61b6..7fc7b0b 100644 --- a/Linux_reinstall/Ubuntu/CloudInit/dhcp_interfaces.cfg +++ b/Linux_reinstall/Ubuntu/CloudInit/dhcp_interfaces.cfg @@ -57,6 +57,7 @@ runcmd: - 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 - sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf - sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf