-
-
Save chrisvaughn/7f4456ee004cf13c8faf78e5978056b2 to your computer and use it in GitHub Desktop.
Launchd Config for on-demand SSH tunnel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.openssh.port-forwards</string> | |
<key>OnDemand</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/ssh</string> | |
<string>-C</string> | |
<string>-o ControlMaster=auto</string> | |
<string>-o ControlPath=#### SOMEPATH ####</string> | |
<string>-o ControlPersist=16</string> | |
<string>-o ServerAliveCountMax=2</string> | |
<string>-o ServerAliveInterval=5</string> | |
<string>-W localhost:#### ZNC PORT ####</string> | |
<string>#### HOSTNAME ####</string> | |
</array> | |
<key>Sockets</key> | |
<dict> | |
<key>Listeners</key> | |
<dict> | |
<key>SockServiceName</key> | |
<string>#### LOCAL LISTEN PORT ####</string> | |
<key>SockType</key> | |
<string>stream</string> | |
</dict> | |
</dict> | |
<key>inetdCompatibility</key> | |
<dict> | |
<key>Wait</key> | |
<false/> | |
</dict> | |
<!-- | |
<key>StandardErrorPath</key> | |
<string>/tmp/org.openssh.port-forwards.launchd.err</string> | |
--> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment