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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3echo "selinux command is untested. copy paste systemd file if you want"
4echo "reboot afterwards(selinux unset, need reboot to take effect, or just do sudo setenforce 0 for temp unset)"
3echo "make sure /root/m exists" 5echo "make sure /root/m exists"
4echo "remember to change the remote port or host if needed" 6echo "remember to change the remote port or host if needed"
5 7
8# disable selinux
9sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
10
6sudo cat << 'EOF' > /etc/systemd/system/ssh-tunnel.service 11sudo cat << 'EOF' > /etc/systemd/system/ssh-tunnel.service
7[Unit] 12[Unit]
8Description=Persistent SSH Tunnel 13Description=Persistent SSH Tunnel