summaryrefslogtreecommitdiffstats
path: root/bin/laptop/ssh-key-unlock
diff options
context:
space:
mode:
Diffstat (limited to 'bin/laptop/ssh-key-unlock')
-rwxr-xr-xbin/laptop/ssh-key-unlock7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/laptop/ssh-key-unlock b/bin/laptop/ssh-key-unlock
new file mode 100755
index 0000000..e2654f1
--- /dev/null
+++ b/bin/laptop/ssh-key-unlock
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+keychain -q --timeout 30
+. ~/.keychain/${HOSTNAME}-sh
+if ! ssh-add -l | grep -q '.ssh/id_rsa'; then
+ ssh-add-helper ~/.ssh/id_rsa
+fi