You want to connect to the database, but:
- you can’t get to the server directly, or
- you can’t talk to the listener port
If ONLY there were a way you could smuggle your database connection through another network connection that could do those things.
Well there is, and it’s called an SSH tunnel.
SSH talks on port 22 – which is more often than not open on your locked down servers.
So if you can get a SSH connection going, you could send SQL*Net traffic over that connection…and on the other end of the tunnel, you could establish connections to the database.
That’s not the most eloquent description of the concept, but we have Wikipedia to help with that. And I’m guessing that everyone reading this will already be intimately aware of SSH tunnels.
Instead of having to do it outside of SQL Developer, now you can define/create those tunnels with the tool itself.
So, after you…
Upgrade to Version 4.0.3…
…you can now do this 🙂
And provide your authentication details
Now, my ssh connection is a bit weird. I’ve simply created a port forwarding scheme in my VM – traffic on port 22 on the host is forwarded to port 22 on the Linux VM. And then from there, the server will open a connection to the database.
If you’re using an IP address or server name in your regular Oracle connection properties – that info HAS to make sense to the server that you have SSH’d into.
Today and Tomorrow
Today, the tunnel is defined at the connection level. Now, you will probably need to create tunnels for more than just one connection, and many of them might be shared.
So, in an upcoming release, we see having the ability in the preferences to define your tunnels, and reuse them as you define each connection.
Now the ‘Tomorrrow’ Bit
We updated the ssh tunneling interface for version 4.1. You can define 1 tunnel and use it for multiple connections. The tunnels are defined and managed in the View > SSSH panel.
Defining the SSH tunnel AND the port forward:
Now use the tunnel in your connection properties:
Oracle ACE Danny Bryant has a nice 4.0 vs 4.1 SSH Tunneling overview here.