summaryrefslogtreecommitdiff
path: root/src/monkeysphere-ssh-proxycommand
blob: 17249667879ca7e5b6f37eb7d314a1ba89e35f9d (plain)
  1. #!/bin/sh -e
  2. # MonkeySphere ssh ProxyCommand hook
  3. # Proxy command script to initiate a monkeysphere known_hosts update
  4. # before an ssh connection to host is established.
  5. # Can be added to ~/.ssh/config as follows:
  6. # ProxyCommand monkeysphere-ssh-proxycommand %h %p
  7. HOST="$1"
  8. PORT="$2"
  9. # update the known_hosts file for the host
  10. monkeysphere update-known-hosts "$HOST"
  11. # make a netcat connection to host for the ssh connection
  12. exec nc "$HOST" "$PORT"