It looks like you are trying to connect to a database that either locally is not known, or remotely does not have permissions for your user.
Locally you must define the remote hostname in DNS (or the local /etc/hosts file) and also the remote instance in the sqlhosts file. Test this by trying to connect to the remote instance using dbaccess.
Remotely the username you are connecting as must exist, and be trusted in the database with connect, select etc. permissions.