Skip to content

Instantly share code, notes, and snippets.

Last active December 6, 2022 07:59
What would you like to do?
autossh plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
Copy link

lenciel commented Jul 11, 2014

This is a plist file for starting autossh automatically after you login to your Mac.

To use:

  • Install autossh

    $ brew install autossh
  • Ensure you have passwordless ssh between yourself and your remote server

  • Change /opt/boxen/homebrew/bin/autossh to the output of which autossh

  • Change the string after -i (it is fuckgfw now) to your private key file name if you have

  • Change the string remotehost to the host which save your ass

  • Modify the logging related configuration if you don't use boxen . Or remove the block completely if you don't want to see any log

  • Copy the above gist to ~/Library/LaunchAgents/autossh.lenciel.plist

  • Ask OSX to launch autossh every time you log in:

$ launchctl load ~/Library/LaunchAgents/autossh.lenciel.plist

After this you might need to setup your browser or tell OSX to use the encrypted connection globally by : System Preferences Network Advanced Proxies

Change at least the Web Proxy (HTTP), Secure Web Proxy (HTTPS), and FTP Proxy entries and enjoy it.

Copy link

got3nks commented Apr 25, 2020

Thanks a lot for sharing it!

In my case, I had to remove -f from the options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment