diff options
| author | hc <hc@email.ch> | 2024-11-23 17:39:02 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2024-11-23 17:39:02 +0800 |
| commit | 50c5e7a8f7d4fedec41af994dc97987bb24c02ed (patch) | |
| tree | 5d90acef0ee06e0805fd685fb2712c72260f3ff3 | |
| parent | ba9539a4f49d722063e5a322133c89affd6a9fb7 (diff) | |
comments autossh
| -rwxr-xr-x | port-forward/persistent-ssh.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/port-forward/persistent-ssh.sh b/port-forward/persistent-ssh.sh index 086bfc6..3021825 100755 --- a/port-forward/persistent-ssh.sh +++ b/port-forward/persistent-ssh.sh | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | echo "make sure /root/m exists" | ||
| 4 | echo "remember to change the remote port or host if needed" | ||
| 5 | |||
| 3 | sudo cat << 'EOF' > /etc/systemd/system/ssh-tunnel.service | 6 | sudo cat << 'EOF' > /etc/systemd/system/ssh-tunnel.service |
| 4 | [Unit] | 7 | [Unit] |
| 5 | Description=Persistent SSH Tunnel | 8 | Description=Persistent SSH Tunnel |
