Install putty, it can be downloaded here:

Database = testdb and Oracle Names/Tnsnames.ora has this alias.
Host =
Port = 1545
You have Putty installed.


Tunneling your SQL*Net traffic over an SSH link is the smart option in case you are not encrypting your passwords and they are sent as clear text.



Note the host and port.

testdb_ssh =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 5555))
(SID = testdb)

Ensure sqlnet.ora will actually look in tnsnames.ora:


Place Putty is on your %PATH% and run the following:

Command Line

ssh -N -L username@server_name_to_which_db_is_installed
Traffic on localhost:5555 is forwarded via SSH to port 1545 on server This is where you have a listener already running.

Type the ssh password when prompted. Setup your ssh key to avoid being prompted – good practice is to generate a key with a pass-phrase.

Connect to a username@testdb_ssh to use the SSH tunnelling.

Putty Setup

Start Putty as normal.
On the Connection page, enter username@server_name_to_which_db_is_installed.

On the SSH→Tunnels page:


  1. “Local ports accept connections from other hosts”
  2. “Remote ports do the same (SSH-2 only)”.


Enter  for the Source Port 5555 – the port in your tnsnames.ora file.
Enter as the Destination.
Make sure that Local is selected.
Leave Auto selected for IP version.
Click the Add button.
On the Connection tab, fill in a name for the saved session, ssh_testdb for example.
Click the Save button.
Now, and in future, simply select this saved session and click the Open button to create your tunnel.