Troubleshooting
Problem
Trying to connect to remote database fails with -956 error
Resolving The Problem
PROBLEM
When you try to connect to a remote database through dbaccess or an other application you get returned an error -956:
-956
Client client-name is not in /etc/hosts.equiv on the remote host.
This operation cannot be completed because the specified remote computer does not recognize the name of the client computer (the local host, whose name the hostname command returns). Client names are normally recorded in the configuration file /etc/hosts.equiv. The rhosts file on the remote computer might also need modification. For more information on these files and the relation between them, try man rhosts on a UNIX system. See the remote host administrator to ensure that the client host name is specified in /etc/hosts.equiv file for the remote host. This message appears in versions prior to Version 6.0.
-956
Client client-name or user is not trusted by the database server.
The desired database server does not consider the client computer or your user ID trusted. Ask the system administrator to include the client computer as a trusted host and/or your user id as a trusted user in the /etc/hosts.equiv file on the server computer or in the .rhosts file in your home directory on the server computer. See the UNIX manual pages on HOSTS.EQUIV(5) for more information.
Alternatively, you can explicitly specify your user name and password in the USER clause of a CONNECT statement or in the .netrc file in your home directory on the client computer. See the IBM Informix Guide to SQL: Syntax for information on the CONNECT statement, and the UNIX manual pages regarding NETRC(5) for information on the .netrc file. This message appears with Version 6.0 and later.
SCOPE
The following products and operating systems are affected:
Product Name | Product Version(s) | Hardware Vendor | Operating System |
IBM® Informix® Dynamic Server™ | All | All |
SOLUTION
Check the following files on both local and remote sides, verify if they respect the following entries and try the connection again.
Local side
$INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS file): DBSERVERALIASES_machine_server onsoctcp machine_server serviceA
/etc/hosts:
IPmachine_server machine_server
IPmachine_client machine_client
/etc/hosts.equiv:
+user (login of the person who is trying to connect)
/etc/services:
serviceA num_serviceA/tcp
serviceB num_serviceB/tcp
$HOME/.rhosts:
IP_machine_cliente machine_cliente
IP_machine_server machine_server
Remote side
$INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS file):
DBSERVERALIASES_machine_cliente onsoctcp machine_cliente serviceB
/etc/hosts:
IPmachine_server machine_server
IPmachine_client machine_client
/etc/hosts.equiv:
+user (login of the person who is trying to connect)
/etc/services:
serviceA num_serviceA/tcp
serviceB num_serviceB/tcp
$HOME/.rhosts:
IP_machine_cliente machine_cliente
IP_machine_server machine_server
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21265434