Connecting to remote oracle db
The error  ORA-12162 is return because the client (sqlplus) doesn't manage to resolve the tns name provided:

 sqlplus user/passwd@ALIAS_TNS


The ALIAS_TNS have to be described in the tnsnames.ora file on the client side. Usually, this file is under ORACLE_HOME/network/admin. 

Note that since Oracle 10g another connection syntax exist and does not require the tnsnames.ora. the syntax is:

sqlplus username/password@[//]host[:port][/service_name]