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