From 2379a457a87afc9507f0f2a9664fcb47006a2aa2 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 24 May 2020 23:02:20 -0700 Subject: Saner environment in SSH sessions, and automatically restart sshd. --- ssh/run | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 ssh/run (limited to 'ssh/run') diff --git a/ssh/run b/ssh/run new file mode 100755 index 0000000..470c91b --- /dev/null +++ b/ssh/run @@ -0,0 +1,18 @@ +#!/system/xbin/bash -l + +SSHD="$(which sshd)" + +while true; do + + nohup "$SSHD" \ + -D \ + -f "$MODDIR"/ssh/sshd_config \ + -h "$MODDIR"/ssh/ssh_host_rsa_key \ + -o "AuthorizedKeysFile $MODDIR/ssh/authorized_keys" \ + -o "ForceCommand $MODDIR/ssh/setup-connection" \ + > /dev/null & + wait + + sleep 1 + +done -- cgit v1.2.3