From 58521cb1c0ab62f00b6102e6fdc892c04dc32a25 Mon Sep 17 00:00:00 2001 From: clewsy Date: Mon, 21 Aug 2023 14:11:25 +1000 Subject: [PATCH] First create the .ssh directory if it doesn't exist. --- modules/autossh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/autossh b/modules/autossh index 5843a78..24748cb 100755 --- a/modules/autossh +++ b/modules/autossh @@ -13,7 +13,7 @@ CONF=/tmp/autossh.form function start { autossh_host=$(uci show autossh.@autossh[0].ssh | awk '{print $7}' | sed 's/@/ /g' | awk '{print $2}') - touch /root/.ssh/known_hosts + mkdir -p /root.ssh && touch /root/.ssh/known_hosts if grep $autossh_host /root/.ssh/known_hosts; then /etc/init.d/autossh start else