Skip to content

Instantly share code, notes, and snippets.

@pratul
Created September 28, 2010 06:04
Show Gist options
  • Save pratul/600496 to your computer and use it in GitHub Desktop.
Save pratul/600496 to your computer and use it in GitHub Desktop.
A launchd agent that maintains a background ssh tunnel
<?xml version="1.0" encoding="UTF-8"?>
<!-- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE -->
<!-- Version 2, December 2004 -->
<!-- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> -->
<!-- Everyone is permitted to copy and distribute verbatim or modified -->
<!-- copies of this license document, and changing it is allowed as long -->
<!-- as the name is changed. -->
<!-- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE -->
<!-- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -->
<!-- 0. You just DO WHAT THE FUCK YOU WANT TO. -->
<!-- This script initially written by Pratul Kalia (pratul@pratul.in) -->
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>in.pratul.sshtunnel</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh</string>
<string>-v</string>
<string>-T</string>
<string>-D</string>
<string>3128</string>
<string>lut4rp@174.133.21.86</string>
</array>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/sshtunnel.err</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment