'Log into ssh server, check banner, then exit'

def connected(self):

    p = pexpect.spawn('ssh    10.0.0.1    -o    StrictHostKeyChecking=no    -i    /tmp/ssh/test_rsa    exit')
    while True:
        index = p.expect(self.opts)
        if (index == 0):
            return True
        else:
            return False
