BMMevius / configs-and-programs

Config files and programs
0 stars 0 forks source link

Add `.zprofile` #59

Closed BMMevius closed 10 months ago

BMMevius commented 1 year ago
if [ -z "$SSH_AUTH_SOCK" ]; then
   # Check for a currently running instance of the agent
   RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
   if [ "$RUNNING_AGENT" = "0" ]; then
        # Launch a new instance of the agent
        ssh-agent -s &> .ssh/ssh-agent
   fi
   eval `cat .ssh/ssh-agent`
fi

ssh-add $HOME/.ssh/id_rsa