Skip to content

Instantly share code, notes, and snippets.

@wrouesnel
Created August 10, 2022 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrouesnel/855b7ce87e6d6fd9e79b5272707aaa1d to your computer and use it in GitHub Desktop.
Save wrouesnel/855b7ce87e6d6fd9e79b5272707aaa1d to your computer and use it in GitHub Desktop.
Systemd script with restarts which will keep going
[Unit]
Description=Maintain a reverseit SSH connection
After=network.target
StartLimitBurst=5
# This line disables the "stop forever" start back off
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/reverseit --log-level=debug client 127.0.0.1:22 -- ssh -T monolith.wrouesnel.com
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment