diff options
Diffstat (limited to 'profile_vm_provisioning')
-rw-r--r-- | profile_vm_provisioning | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/profile_vm_provisioning b/profile_vm_provisioning index 1b8fc5b..806a66f 100644 --- a/profile_vm_provisioning +++ b/profile_vm_provisioning @@ -2,7 +2,20 @@ # # sh/ksh initialization -eval `ssh-agent -s` +# if we have private ssh key(s), start ssh-agent and add the key(s) +id1=$HOME/$USER/.ssh/identity +id2=$HOME/$USER/.ssh/id_dsa +id3=$HOME/$USER/.ssh/id_rsa +id4=$HOME/$USER/.ssh/id_ecdsa +id5=$HOME/$USER/.ssh/id_ed25519 +if [ -z "$SSH_AGENT_PID" ]; +then + if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 -o -f $id4 -o -f $id5 ]; + then + eval `ssh-agent -s` + ssh-add < /dev/null + fi +fi PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games |