dot/.config/scriptrc/ssh.sh
2025-05-26 21:59:45 +02:00

8 lines
236 B
Bash

if [[ "$(uname)" != "Darwin" ]]; then
if type ssh-agent &>/dev/null; then
ssh-add &>/dev/null || eval `ssh-agent -s`
if [[ "$(ssh-add -l)" == "The agent has no identities." ]] ; then
ssh-add ~/.ssh/id_rsa
fi
fi
fi