Aa Fdfadf Dfadfads Fdadf

Páginas: 8 (1846 palabras) Publicado: 23 de enero de 2013
Assuming Windows as you wish to run Toad and assuming that you use
Putty, do the following:

1. Open putty and on the session page, enter the name of a server and
make sure SSH is checked. The server can be any server that you have a
username and password to login with. I use one here called BLUEBIRD as I
own it!

2. On the connection->ssh->tunnels page, uncheck both options at thetop
("Local ports accept ..." and "Remote ports do the same"). 

3. Enter 9999 (or any port above 1024 as the Source Port.

4. In the destination, enter the database host and port as per tnsnames.
In my case, this is a server called GREENBIRD and a port of 1521. Enter
this as server:port.

5. As the port being forwarded is on your desktop, check the "Local"
option. Leave "Auto" checkedas well for the IP version.

6. Click the Add button. You will see L9999 greenbird:1521 (your will
differ) in the list of forwarded ports.

7. Go to the session page again, Enter a name for your saved session and
click save.

8. Click open. Supply a username and password for the server (BLUEBIRD
in my case). You will login a normal ssh session to the server named
BLUEBIRD.

However, youalso have an SSH Tunnel from localhost:9999 to
greenbird:1521 - in my case - so anything going to localhost:9999 will
be tunnelled over to greenbird:1521, where the normal listener is
waiting expectantly!

In your ORACLE_HOME/network/admin/tnsnames.ora file, add an entry for
your database. Mine is called perf10g, so I add one called perf10g_ssh,
as follows:

perf10g_ssh.WORLD =(DESCRIPTION =
(SOURCE_ROUTE = OFF)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 9999))
)
(CONNECT_DATA =
(SID = perf10g)
(SRVR = DEDICATED)
)
)

Note the host and port, they are the ones I've used in the putty
session.

As long as your putty session is running, you can connect with Toad or
SQLPlus etc to username/password@perf10g_ssh and get forwarded to the
realdatabase. Once you are connected, you can actually logout the putty
session. Putty will not exit until Toad subsequently logs out as well -
which is handy as you are not leaving an open ssh session to a server
running unattended.

Assuming you are using some other form of ssh system, then you need to
do the equivalent of:

ssh -L 9999:localhost:1521 greenbird

in order to open up atunnel.

If you see a message about "no listener" when you try and connect, then
your tunnel is either not open, or has gone down for some reason.

-------------------------------------------------
Tunnelling SQL*Net Traffic Over An SSH Link
Ever had the worry that when you connect to a database to send some data to it, that some eavesdropper on the network might just be waiting to catch all yourpasswords (Oracle sends passwords in plain text - by default - go figure) and sensitive data like Credit Card numbers and security codes, bank account details etc?
You have two options, you can ask SQL*Net to encrypt the network traffic, but that then applies to everyone, or you can set up your own system whereby you can tunnel your SQL*Net traffic over anSSH link.
Assume the following:
*Database = perf10g and Oracle Names/Tnsnames.ora has this alias.
* Host = greenbird.
* Port = 1521.
* You have Putty installed.
The process to set things up is as follows.
Edit Tnsnames.ora:
You need a new alias for the SSH version of the database, so add the following to your tnsnames.ora. Don't worry if you are using Oracle Names:
-------------------------------------------------perf10g_ssh.WORLD =
-------------------------------------------------
(DESCRIPTION =
-------------------------------------------------
(SOURCE_ROUTE = OFF)
-------------------------------------------------
(ADDRESS_LIST =
-------------------------------------------------
(ADDRESS = (PROTOCOL...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • AA
  • AA
  • Aa
  • AA
  • AA
  • Aa
  • AA
  • AA

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS