changeset 860:af998083be84

add ssh keys
author Jeff Hammel <k0scist@gmail.com>
date Sat, 14 Apr 2018 16:01:05 -0700
parents b8510769d001
children c3a87bd40482
files .bashrc
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Wed Apr 11 12:28:37 2018 -0700
+++ b/.bashrc	Sat Apr 14 16:01:05 2018 -0700
@@ -627,6 +627,25 @@
     . "${LOCAL_BASHRC}"
 fi
 
+### add ssh keys
+if which ssh-add
+then
+    for key in ${HOME}/.ssh/*.pem; do
+        ssh-add "${key}" >> /dev/null
+    done
+    if [ -e "${HOME}/.ssh/k0s_rsa" ]
+    then
+        ssh-add "${HOME}/.ssh/k0s_rsa"
+    fi
+fi
+
+### AWS credentials
+if [[ -f "${HOME}/.aws/credentials" ]]
+then
+    eval $(awk 'NR != 1 { print "export", toupper($1) "=" $3 }' ~/.aws/credentials)
+fi
+
+
 ### regenerate fluxbox menus here for convenience
 MENU=~/web/site/programs.html
 regeneratefluxmenu() {