Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use built-in SSH in Oracle SQL Developer instead of using PuTTY first

I don't have extensive knowledges about Oracle SQL Developer (Version 17.2) and SSH tunnel. I have been using PuTTY (KiTTY is the software I used) to establish SSH tunnel to connect to the database. This is the example of how I set up originally with KiTTY. Also, when I start the session where a command prompt window will pop up, I'll need to enter username and password. Let's assume the Username is username and the Password is password. And for the database, the Username is database_username and the Password is database_password.

SSH Setup:

Tunnel Setup:

I learned that you can use SSH (View > SSH) function directly from Oracle SQL Developer, and I have tried for two days but didn't work. From the information I have attached in the two pics above, will I be able to use the built-in SSH function or do I have to always use PuTTY? This is how I set up currently:

SSH in Oracle SQL Developer Setup:

How should I change the built-in SSH setup in order for me to connect to database through SSH? Will this be possible? If so, can you show me exactly what I need to enter the information into those fields (please use mine so I can follow each step)? I just think this process can be simplified within one program.

like image 414
ian0411 Avatar asked Sep 13 '17 15:09

ian0411


1 Answers

I finally found the answer for myself after two days of searching and a coworker's advice. Here is what you do to use built-in SSH function in Oracle SQL Developer that also requires SSH Tunnel. And no more PuTTY is needed for this process.

SSH Setup:

As shown in the pic below, this is what you need to enter. Please note there are two Name's fields. You can make up any name you like to use. Don't forget to perform a Test run to ensure this works. To Test run, go to SSH Hosts window, right click on the SSH connection and select Test.

enter image description here

Now the tricky part is here. You should see there is a Connections window on the upper left corner. Click the green plus icon button to add a New Connection.

Database Connection Setup:

Fill out the info as you can see the pic below for example. The key is to change the Connection Type to SSH, Port Forward should also point to the SSH connection that you setup above, and you should have a Service name provided by your DBA team. Once this is set, you can perform a quick Test run and see if everything is working.

enter image description here

The good thing about this setup is that you don't need to run PuTTY on the side. You can simply click the database name and it will prompt you the password and that is it.

P.S. I heard there is a way to store the password using SSH key but I am not familiar with the process and still trying to figure that out. Maybe post your steps here and I will definitely upvote for you.

like image 191
ian0411 Avatar answered Nov 20 '22 14:11

ian0411