SQL Developer SSH connection

April 21, 2016 at 9:47 am | Posted in Oracle Application Express (Apex), Oracle Developement, Oracle Tools, PL/SQL | 7 Comments
Tags: ,

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.

  1. In SQL Developer select SSH from the View menu. The opens up the SSH Hosts dock.
  2. Right click the SSH Hosts node in the dock and select New SSH Host from the context menu.
  3. Fill out the New SSH Host form
    1. Name: The name of your connection
    2. Host: Remote host address
    3. Port: Should default to 22
    4. Username: The username of the SSH connection
    5. Use key file: Browse to the .pem key file needed for this connection
    6. Add a Local Port Forward: Check this to forward to a local port.
      1. Name: A name for this port forward
      2. Host: The same as above
      3. Port: Database port of the remote host
      4. Automatically assign local port (selected) or you can choose to use a specific local port if you wish
  4. 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:

  1. Fill in the connection name, username and password for the remote database.
  2. For Connection Type choose SSH.
  3. Select the newly created Port Forward from the select list.
  4. Click Service Name and fill in the service name of the remote database.
  5. Test and Save the connection.

That’s it. You should now be able to connect via the SSH Tunnel.


RSS feed for comments on this post. TrackBack URI

  1. Christoph,
    Very timely post. Just last night I was setting up a new Oracle Cloud service, and ran into SSH connection with SFTP. New topic for me. Was unable to get it to work, and will be working more on it today. Am I correct that with this feature in SQL Developer, I wouldn’t need to get the tunnel open in SFTP first, that SQL Developer would be all I’d need?

    • Hi Skip,
      you are correct. I previously used an SSH tunnel with port forwarding to access our cloud database. Now I switched to this, and I don’t have to worry about establishing the tunnel beforehand anymore.


  2. Is it possible without a key file ( with a password)

  3. […] a previous post I explained how to set up a SQL Developer connection with SSH using a .pem key file. In this post […]

  4. Hi,

    I’m trying to get this to work too but our server needs a user-password along with the key file definition. It has probably something to do with our company policies.
    This option is not there in SQL Developer so it’s not going to work for our purposes.

    Does anyone know how to get the server accept the provided key file without the extra pasword?

    thanks in advance!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Entries and comments feeds.

%d bloggers like this: