2022-04-16 11:58:00 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Keep ssh tunnel to specified remote host open
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2024-12-16 12:23:21 +00:00
|
|
|
User={{ user }}
|
2022-04-16 11:58:00 +00:00
|
|
|
|
2024-12-16 12:23:21 +00:00
|
|
|
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -L 6379:localhost:6379 tanshu@rohan.tanshu.com
|
2022-04-16 11:58:00 +00:00
|
|
|
|
|
|
|
# Restart every >2 seconds to avoid StartLimitInterval failure
|
|
|
|
RestartSec=5
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|