Skip to content

Instantly share code, notes, and snippets.

@gamefiend
Created January 6, 2012 03:38
Show Gist options
  • Save gamefiend/1568830 to your computer and use it in GitHub Desktop.
Save gamefiend/1568830 to your computer and use it in GitHub Desktop.
Start Cron Agent
#!/bin/sh
# Initalizes ssh agent for use with cron jobs.
# I suggest you use a passphrase!
# Start the cron job agent
/opt/bin/ssh-agent | head -2 > .ssh/agent-info
source .ssh/agent-info
/opt/bin/ssh-add .ssh/cron_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment