Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jcchikikomori/319265aefcdf52a423f845dc0c32b396 to your computer and use it in GitHub Desktop.
Save jcchikikomori/319265aefcdf52a423f845dc0c32b396 to your computer and use it in GitHub Desktop.
Launch ssh-agent on boot (OSX macos)
<plist version="1.0">
<dict>
<key>Label</key>
<string>ssh-add-a</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh-add</string>
<string>-A</string>
</array>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
#!/usr/bin/env bash
# Usage:
# curl -sSL https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/install.sh | bash
# or:
# wget -qO- https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/install.sh | bash
dest="$HOME/Library/LaunchAgents/"
url="https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/AddSSHKeysAtLogin.plist"
mkdir -p "$dest"
cd "$dest"
curl -sLO "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment