Fixed the issue that cannot connect to the remote hosts