update connect_remote.py to handle prompt from json