add sshnk
authorJoerg Jaspert <joerg@ganneff.de>
Mon, 3 Mar 2014 12:47:31 +0000 (13:47 +0100)
committerJoerg Jaspert <joerg@ganneff.de>
Mon, 3 Mar 2014 12:47:31 +0000 (13:47 +0100)
.zsh/functions/sshnk [new file with mode: 0644]

diff --git a/.zsh/functions/sshnk b/.zsh/functions/sshnk
new file mode 100644 (file)
index 0000000..09f8ac1
--- /dev/null
@@ -0,0 +1,10 @@
+## vim:ft=zsh:foldmethod=marker
+
+(
+    local SSH_AUTH_SOCK
+    local SSH_AGENT_PID
+    eval `ssh-agent`
+    ssh-add -c
+    ssh -o ControlPath=none -A -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"
+    kill $SSH_AGENT_PID
+)