print('connecting...')
i = child.expect(["user@remote_computer's password:"])
child.sendline(user_password)
i = child.expect([' .*'])
if i == 0:
    pass
how to get console output from a remote computer (ssh + python)