This are the steps that I performed:
- Open PuTTY and load your saved session.
- Choose Tunnels in the category section. Then in the "source port" section, put any port number that is not in use (example: 1234).
- In the destination text box enter the IP address of the host name (192.168.1.28 in my case) followed by a colon and the destination port number(1521). Remember to click on the ADD button.
- Save your settings in PUTTY.
- Then modify your tnsnames.ora with something like this:
CCOM_PROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1234))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CCOM)
)
)
- Then ssh to the 1st server
- Finally type the following to connect and create the tunnel to the second server:
ssh -L 1234:192.168.1.28:1521
[email protected]