Files
barker/frank/ansible/files/nats-tunnel.service
T
2026-08-30 04:41:27 +00:00

16 lines
468 B
Desktop File

[Unit]
Description=Keep ssh tunnel to specified remote host open
After=network.target
[Service]
User={{ user }}
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -L 4222:localhost:4222 tanshu@{{ server }}.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target