Add SSH Agent startup.

Signed-off-by: Jacob Kiers <jacob@alphacomm.nl>
This commit is contained in:
Jacob Kiers 2015-04-07 11:38:01 +02:00
parent 9a9d1beb88
commit 1415dec58b
2 changed files with 12 additions and 1 deletions

11
includes/bash_ssh.bash Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
[ -f "$HOME/.ssh/*.key" ] || return;
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
fi
for key in $HOME/.ssh/*.key; do
ssh-add $key
done;

View File

@ -70,7 +70,7 @@ NOCOLOR="$(tput sgr0)"
export EDITOR=`which vim` export EDITOR=`which vim`
# Load prompt and aliases # Load prompt and aliases
for file in ~/dotfiles/includes/bash_{prompt,aliases,functions,git,completion}.bash; do for file in ~/dotfiles/includes/bash_*.bash; do
[ -r "$file" ] && source "$file" [ -r "$file" ] && source "$file"
done done
unset file unset file