If you have to access databases that can only be reached through SSH connections, you can configure SQL Developer (4.1) to reach them.
In my example, a .pem key file is required to establish the SSH connection.
- In SQL Developer select SSH from the View menu. The opens up the SSH Hosts dock.
- Right click the SSH Hosts node in the dock and select New SSH Host from the context menu.
- Fill out the New SSH Host form
- Name: The name of your connection
- Host: Remote host address
- Port: Should default to 22
- Username: The username of the SSH connection
- Use key file: Browse to the .pem key file needed for this connection
- Add a Local Port Forward: Check this to forward to a local port.
- Name: A name for this port forward
- Host: The same as above
- Port: Database port of the remote host
- Automatically assign local port (selected) or you can choose to use a specific local port if you wish
- Click OK.
A node with your new connection should now appear in the SSH Hosts connections.
Right click the node and select Test from the context menu. A message with a success message should pop up.
Create a new database connection:
- Fill in the connection name, username and password for the remote database.
- For Connection Type choose SSH.
- Select the newly created Port Forward from the select list.
- Click Service Name and fill in the service name of the remote database.
- Test and Save the connection.
That’s it. You should now be able to connect via the SSH Tunnel.