Skip to content

Instantly share code, notes, and snippets.

@alisade
Created February 20, 2026 04:07
Show Gist options
  • Select an option

  • Save alisade/9faeac71f3e3e4e708e540877b2f853b to your computer and use it in GitHub Desktop.

Select an option

Save alisade/9faeac71f3e3e4e708e540877b2f853b to your computer and use it in GitHub Desktop.
# https://unix.stackexchange.com/questions/90853/how-can-i-run-ssh-add-automatically-without-a-password-prompt
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment