Skip to content

Instantly share code, notes, and snippets.

@mikehale
Created April 5, 2012 15:21
Show Gist options
  • Save mikehale/2311922 to your computer and use it in GitHub Desktop.
Save mikehale/2311922 to your computer and use it in GitHub Desktop.
Ensure OSX Terminal has the current SSH_AUTH_SOCK
# Credit: http://www.dribin.org/dave/blog/archives/2007/11/28/ssh_agent_leopard/
function ssh_auth_socket_sync {
export SSH_AUTH_SOCK=$(ls -1t /tmp/launch-*/Listeners|head -n 1)
}
ssh_auth_socket_sync
@Synchro
Copy link

Synchro commented Oct 2, 2015

In 10.10 this appears to be:

function ssh_auth_socket_sync {
  export SSH_AUTH_SOCK=$(ls -1t /tmp/com.apple.launchd.*/Listeners|head -n 1)
}

ssh_auth_socket_sync

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