@@ -0,0 +1,1339 @@
+#!/usr/bin/python%0A%0Aimport eventlet%0Afrom eventlet.green import socket%0Aimport libssh2%0Aimport time%0Aimport os%0Aimport random%0A%0A%0Adef monitor(hostname, username, id):%0A%0A    print '%25s %25s %25d' %25 (hostname, username, id)%0A    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)%0A    sock.connect((hostname, 22))%0A%0A    session = libssh2.Session()%0A    started = False%0A    while not started:%0A        try:%0A            session.startup(sock)%0A            started = True%0A        except:%0A            eventlet.sleep(1)%0A    session.userauth_publickey_fromfile(%0A        username,%0A        os.path.expanduser('~/.ssh/id_rsa.pub'),%0A        os.path.expanduser('~/.ssh/id_rsa'),%0A        '')%0A%0A    while True:%0A        sl = random.randint(1, 20)%0A        eventlet.sleep(sl)%0A        channel = session.channel()%0A        channel.execute('uname -a')%0A%0A        stdout = %5B%5D%0A        #stderr = %5B%5D%0A%0A        while not channel.eof:%0A            data = channel.read(1024)%0A            if data:%0A                stdout.append(data)%0A%0A            #data = channel.read(1024, libssh2.STDERR)%0A            #if data:%0A            #    stderr.append(data)%0A%0A        print '%25d %25d %25s' %25 (id, sl, ''.join(stdout))%0A        #print ''.join(stderr)%0A%0A%0Apool = eventlet.GreenPool()%0Ai = 1%0Awhile True:%0A    pool.spawn_n(monitor, '192.168.122.238', 'root', i)%0A    i = i + 1%0A    if i %3E 800: break%0A%0Apool.waitall()%0A

Add an experimental ssh monitoring script.