That error means that multichain-cli cannot connect to multichaind. First, you need to ensure you have multichaind running on both instances. Then, if you're trying to connect from multichain-cli which is not running locally on those instances, you need to ensure that multichaind is configured to allow the incoming API connections, using the rpcallowip runtime parameter. You can search this Q&A for rpcallowip for more information.