m.py with updated ssh_execute() and wait() functions