From 9fb10a95ff4275ca2b82c18c0ed8600cd5575319 Mon Sep 17 00:00:00 2001 From: Super User Date: Mon, 23 Mar 2026 19:11:41 +0800 Subject: remove git and port-forward dirs --- port-forward/persistent-ssh.sh | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 port-forward/persistent-ssh.sh (limited to 'port-forward/persistent-ssh.sh') diff --git a/port-forward/persistent-ssh.sh b/port-forward/persistent-ssh.sh deleted file mode 100755 index 36d14dd..0000000 --- a/port-forward/persistent-ssh.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -echo "selinux command is untested. copy paste systemd file if you want" -echo "reboot afterwards(selinux unset, need reboot to take effect, or just do sudo setenforce 0 for temp unset)" -echo "make sure /root/m exists" -echo "remember to change the remote port or host if needed" - -# disable selinux -sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config - -sudo cat << 'EOF' > /etc/systemd/system/ssh-tunnel.service -[Unit] -Description=Persistent SSH Tunnel -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -ExecStart=/usr/bin/ssh \ - -i /root/m \ - -o "ExitOnForwardFailure=yes" \ - -o "StrictHostKeyChecking=no" \ - -N -R 24:localhost:22 root@p.0nom.ch -Restart=always -RestartSec=10 -RemainAfterExit=no -KillMode=process - -[Install] -WantedBy=multi-user.target -EOF - -sudo chmod 600 /root/m -sudo systemctl daemon-reload -sudo systemctl enable --now ssh-tunnel -- cgit