summaryrefslogtreecommitdiff
path: root/src/monkeysphere-ssh-proxycommand
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-06-10 17:17:51 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-06-10 17:17:51 -0400
commit4793624c65673268128fb0146cd9bd1b3cfeb6c4 (patch)
treeccc0f83373ac7e47dd71202ee4376e952652c675 /src/monkeysphere-ssh-proxycommand
parent6c335e70360c7502a2205d21e9f96d4bf2679cbd (diff)
New client/server components:
- broke out all common functions to "common" file - put all client commands into "monkeysphere" script - put all server commands into "monkeysphere-server" script - moved all code into src directory to clean things up a bit - this effectively makes obsolete rhesus and howler - added proposed monkeysphere-ssh-proxycommand script that can be called to update known_hosts from ssh ProxyCommand - updated monkeysphere.conf to work as global client config - added monkeysphere-server.conf for server config
Diffstat (limited to 'src/monkeysphere-ssh-proxycommand')
-rwxr-xr-xsrc/monkeysphere-ssh-proxycommand16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/monkeysphere-ssh-proxycommand b/src/monkeysphere-ssh-proxycommand
new file mode 100755
index 0000000..1724966
--- /dev/null
+++ b/src/monkeysphere-ssh-proxycommand
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+# MonkeySphere ssh ProxyCommand hook
+# Proxy command script to initiate a monkeysphere known_hosts update
+# before an ssh connection to host is established.
+# Can be added to ~/.ssh/config as follows:
+# ProxyCommand monkeysphere-ssh-proxycommand %h %p
+
+HOST="$1"
+PORT="$2"
+
+# update the known_hosts file for the host
+monkeysphere update-known-hosts "$HOST"
+
+# make a netcat connection to host for the ssh connection
+exec nc "$HOST" "$PORT"