Update ssh agent things

This commit is contained in:
Marco Thomas
2021-07-24 20:24:12 +02:00
parent 1f14fe1638
commit c053d05237
4 changed files with 6 additions and 18 deletions

View File

@@ -29,11 +29,9 @@ alias cp='cp -i' # ask before removal
alias mv='mv -i' # ask before removal
# ============================== SSH-Agent
if [ -f ~/.ssh/agent.env ]; then
. ~/.ssh/agent.env > /dev/null
else
if ! [ -S /tmp/marc-agent.sock ]; then
echo "Starting ssh-agent"
eval `ssh-agent | tee ~/.ssh/agent.env`
ssh-agent -a /tmp/marc-agent.sock
ssh-add
fi