Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
On-demand SSH tunnel using launchd
<?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">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.yangl1996.sshtunnelforvnc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh</string>
<string>-q</string>
<string>-T</string>
<string>suse-519</string>
<string>nc localhost 5901</string>
</array>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>5903</string>
</dict>
</dict>
<key>SessionCreate</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.