diff options
| author | hc <hc@email.ch> | 2024-11-23 17:42:54 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2024-11-23 17:42:54 +0800 |
| commit | f51d40db37182988ade2e57b0e5490bff99c13db (patch) | |
| tree | 16a902b8c3b6ceb1c725a1319186844164b5926e | |
| parent | 50c5e7a8f7d4fedec41af994dc97987bb24c02ed (diff) | |
comments autossh
| -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 @@ #!/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 |
