Christoph's 2 Cents

A Backup for My Brain!

Oracle Application Express (Apex)Oracle DevelopementOracle ToolsPL/SQL

SQL Developer SSH connection

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.

ssh

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.

7 thoughts on “SQL Developer SSH connection

  • 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?
    Skip

  • 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.

    Cheers!

  • Is it possible without a key file ( with a password)

  • Pingback: Configure AWS Cloud Instance for SSH access | Christoph's 2 Oracle Cents

  • Michael

    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!
    Michael.

Comments are closed.