From 922af308f261d455d7f80f7d5c716ef3b3f89288 Mon Sep 17 00:00:00 2001 From: Will Starms Date: Fri, 22 Mar 2019 17:05:01 -0500 Subject: [PATCH] Systemd service Assuming an /opt/ install. For those unfamiliar, plop it into /etc/systemd/system (symlinks might not work, old systemd bug), run `systemctl daemon-reload`, and have it start on boot (and immediately) with `systemctl enable --now endlessh.service` --- util/endlessh.service | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 util/endlessh.service diff --git a/util/endlessh.service b/util/endlessh.service new file mode 100644 index 0000000..b7213eb --- /dev/null +++ b/util/endlessh.service @@ -0,0 +1,29 @@ +[Unit] +Description=Endlessh SSH Tarpit +Requires=network-online.target + +[Service] +Type=simple +Restart=always +RestartSec=30sec +ExecStart=/opt/endlessh/endlessh +KillSignal=SIGTERM + +StandardOutput=journal +StandardError=journal +StandardInput=null + +PrivateTmp=true +PrivateDevices=true +ProtectSystem=full +ProtectHome=true +NoNewPrivileges=true +ConfigurationDirectory=/etc/endlessh +PrivateUsers=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectControlGroups=true +MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target