From 2dff3d84c129297d0e8c85b296b8d38d15fb62cc Mon Sep 17 00:00:00 2001 From: douniwan5788 Date: Wed, 15 Feb 2023 21:21:42 +0800 Subject: [PATCH] autossh: bugfix: add env HOME for dropbear ssh Fixed this 5 year old bug https://github.com/openwrt/packages/issues/5559 Signed-off-by: douniwan5788 --- net/autossh/files/autossh.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/autossh/files/autossh.init b/net/autossh/files/autossh.init index 0e7b08666d..a82d3837fe 100644 --- a/net/autossh/files/autossh.init +++ b/net/autossh/files/autossh.init @@ -49,6 +49,9 @@ start_instance() { procd_set_param command /usr/sbin/autossh ${forwarding} ${ssh} procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} [ -n "$pidfile" ] && procd_set_param pidfile "$pidfile" + + #dropbear ssh seek the known_hosts file in $HOME/.ssh/known_hosts + procd_append_param env "HOME=/root" [ -n "$monitorport" ] && procd_append_param env "AUTOSSH_PORT=$monitorport" [ -n "$poll" ] && procd_append_param env "AUTOSSH_POLL=$poll"