Home » RDBMS Server » Networking and Gateways » Connect to remote Linux Server with SSH Tunnel
Connect to remote Linux Server with SSH Tunnel [message #161500] Sun, 05 March 2006 19:55 Go to next message
new_developer
Messages: 10
Registered: March 2006
Junior Member
Hi All,

I need some help. I have a Windows XP machine with an Oracle Client and an SSH Client. I have established a connection to an Oracle database on a remote Linux server with the SSH Client. Now I would like to use my Oracle Client (PL/SQL Developer) to connect to this database using the SSH secure tunnel. I was told to point to my localhost but I simply cannot get this to work. Here are the entries in my files:

TNSNAMES.ORA
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = catalystlaptop)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
#New entry 3/5/2006
FDXPRS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = catalystlaptop)
(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = 'server_address')
(SID = 'dbname')
)
)

SQLNET.ORA
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)
#names.directory_path = (TNSNAMES,ONAMES)
#names.default_domain = world

#name.default_zone = world
#names.default_domain=world
#trace_level_client = 16
#sqlnet.kerberos5_clockskew=3000
#AUTOMATIC_IPC = OFF
#TRACE_LEVEL_CLIENT = OFF

LISTENER
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = 'dbname') --same is in tnsnames.ora
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = catalystlaptop)(PORT = 1521))
)
)

DEFAULT_SERVICE_LISTENER = (XE)

I can connect to the server with the secure tunnel (SSH) and then run sql plus and connect to the database. When I try to connect to the remote database with my local Oracle Client I get an ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.

This is very frustrating since I have never configured a client to connect to a remote database using my local host and a secure tunnel. Does anybody have any insight? Any help is greatly appreciated.

Thanks,
K

Re: Connect to remote Linux Server with SSH Tunnel [message #161504 is a reply to message #161500] Sun, 05 March 2006 20:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I simply cannot get this to work.
Based upon what verifiable evidence do you have that this is a supported mode of operation?
Essentially, SSH is nothing more than an encrypted TELNET session.
What leads you to conclude that PL/Developer can/should communicate via TELNET/SSH with the database?
Re: Connect to remote Linux Server with SSH Tunnel [message #161698 is a reply to message #161504] Mon, 06 March 2006 15:38 Go to previous messageGo to next message
new_developer
Messages: 10
Registered: March 2006
Junior Member
If it's possible to do this with Toad and Oracle Enterprise Manager then why wouldn't it be possible with PL/SQL Developer?
Re: Connect to remote Linux Server with SSH Tunnel [message #162088 is a reply to message #161504] Wed, 08 March 2006 11:57 Go to previous message
new_developer
Messages: 10
Registered: March 2006
Junior Member
anacedent,

You establish port tunneling and set the tunnel from localhost:1521 to remote localhost:1521. Then in you tnsnames your HOST = localhost and your service name = the databse on the remote server.

I was able to connect this way.

K
Previous Topic: ORA-12505 when connecting to new instance
Next Topic: SQL Net trace
Goto Forum:
  


Current Time: Sun Apr 28 08:09:22 CDT 2024