hope I got the merge wright...
[monitor.git] / tools / getsshkeys.py
diff --git a/tools/getsshkeys.py b/tools/getsshkeys.py
new file mode 100755 (executable)
index 0000000..0104deb
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+import sys
+sys.path.append('.')
+sys.path.append('..')
+
+from monitor.util.file import *
+
+def main(hosts):
+       k = SSHKnownHosts()
+       if len (hosts) > 0:
+               for host in hosts:
+                       k.updateDirect(host)
+       else:
+               k.updateAll()
+       k.write()
+
+if __name__ == '__main__':
+       main(sys.argv[1:])