1 Reply Latest reply on Oct 1, 2019 12:29 PM by thatJeffSmith-Oracle

    SQLDev connect via SSH tunnel

    Brad Peek

      Hoping to get some clarification on the use cases for the SQLDev SSH connection type    

       

      I have three scenarios (SQLDev v19.2):

       

      • db_server_1 hosts db_1 and has ports 22 and 1521 open from SQLDev windows client
        • To connect to db_1 I can use a basic connection (no port forwarding needed)

       

      • db_server_2 hosts db_2 and has port 22 open from SQLDev windows client but not port 1521
        • To connect to db_2 I can create an SSH host connection (port 22) to host db_server_2 with a local port forward of db_server_2 port 1521
        • This worked fine for me.

       

      • db_server_3 hosts db_3 but is not reachable from SQLDev client,  However db_3 is reachable from db_server_2 via port 1521
        • Is there a way to connect to db_3 from the SQLDev client?
        • I created a 2nd local port forward for SSH host db_server_2 that specified db_server_3 as the host and port 1521 being tunneled back to the SQLDev client.
        • I was able to right-click the local db_server_3 entry from the SSH hosts panel and get a successful connection but when I created a connection to db_3 that used this local port forward entry it just sits and spins.  
          • It spins until I right-click the SSH local port forward entry in the SSH hosts panel and choose disconnect, at which time I get an error message from the DB connection panel.

       

      MobaXterm has a way to set up a local-host -> jump-box -> remote-host connection for SSH connections and this seemed very similar so I thought I would try it.  

       

      Put another way, here is what I would like to work:

       

      SQLDev windows client -> SSH host db_server_2 (port 22) -> SSH host db_server_3 (22) -> db-3 (1521)

       

      So, db_server_2 would be used as a jump box to get to db_server_3.

        • 1. Re: SQLDev connect via SSH tunnel
          thatJeffSmith-Oracle

          db_server_3 hosts db_3 but is not reachable from SQLDev client,  However db_3 is reachable from db_server_2 via port 1521

           

          What you need is for db_server_ to be reachable by port 22, then you can create an SSH tunnel to server two, and THEN connect to the database on DB_SERVER_2...assuming 1521 is open on db_server_3 from db_server_2