Skip to content

Instantly share code, notes, and snippets.

@stvhay
Forked from swinton/autossh.plist
Last active November 24, 2020 11:12
Show Gist options
  • Save stvhay/36c15a5d975d0ea4a724054473daf940 to your computer and use it in GitHub Desktop.
Save stvhay/36c15a5d975d0ea4a724054473daf940 to your computer and use it in GitHub Desktop.
launchd plist for keeping a tunnel alive
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- https://www.launchd.info/ -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>tunnel.autossh</string>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/autossh</string>
<string>-M0</string>
<string>-N</string>
<string>-L</string>
<string>4242:localhost:4242</string>
<string>[email protected]</string>
</array>
<key>StandardOutPath</key>
<string>/Users/steve/Logs/autossh/autossh.stdout</string>
<key>StandardErrorPath</key>
<string>/Users/steve/Logs/autossh/autossh.stderr</string>
<key>User</key>
<string>steve</string>
<key>ThrottleInterval</key>
<integer>30</integer>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment