JSON-protocol interaction for mssh