summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xport-forward/persistent-ssh.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/port-forward/persistent-ssh.sh b/port-forward/persistent-ssh.sh
index 3021825..36d14dd 100755
--- a/port-forward/persistent-ssh.sh
+++ b/port-forward/persistent-ssh.sh
@@ -1,8 +1,13 @@
#!/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