Skip to content

Instantly share code, notes, and snippets.

@tstellanova
tstellanova / start_ssh_agent.sh
Created September 7, 2014 15:54
Start ssh-agent at startup on ubuntu
# typically you'd add this at the end of eg .bashrc
# setup ssh-agent
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"