menu
bartleby
search
close search
Hit Return to see all results

How to use ProstgreSQL in my local Java IDE using SSH tunneling?

Question

How to use ProstgreSQL in my local Java IDE using SSH tunneling?

check_circleAnswer
Step 1

So here we have to do three things,

1) first we need to create a SSH tunnel to the postgreSQL db but th tunneling should be a local one.

2) Second we need to access the DB using psql

3) We need to setup connectiopn parameter to connect.

 

Step 2

First thing is to create a SSH tunnel as below.

ssh -L 6666:db_hostname:5432 ssh_hostname@ssh_ipaddress -p ssh_portnumber

Here the -L specifies that we are using local SSH tunelling.
Step 3

Second is to ssh to the postgreSQL server and enter below command

psql -h db_hostname -U db_username db_name

here we are connecting to the host using ssh....

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Our solutions are written by experts, many with advanced degrees, and available 24/7

See Solution
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: write a program that reads a line of text and then displays the line, but with the first occurrence...

A: Given below program reads the first occurrence of “hate” and displays “love “ in place of “hate”.

question_answer

Q: Draw a full-adder using only NAND gates.

A: The full adder circuit with NAND gates is shown below.  It is a simple 1 bit adder.

question_answer

Q: Part 1: Stack As mentioned in class, Python 3 provides the LifoQueue class as part of the Queue libr...

A: Import the given class in another file.Create the function postfix() which takes a string as its arg...

question_answer

Q: Visual Basic. Given two variables, isEmpty of type boolean, indicating whether a class roster is emp...

A: We will have two check the below conditions:-1) class roster is not empty2) the class is one or thre...

question_answer

Q: For this program you need to use Eclipse. Carefully read the instructions and write a program that r...

A: Program plan:Class name: EmpPayrollImport the required header files.Define the class "EmpPayroll"Def...

question_answer

Q: Consider the following segment of code:procedure Mvar x: integer;procedure A (c: integer)var a, b: i...

A: Instructions for drawing the runtime stack (at “a:= c-d;”):The stack includes the activation records...

question_answer

Q: Complete the following programming assignment. Use good programming style and all the concepts previ...

A: Program Instructions:Create four methods named insertionSort(), bubblesort(), mergesort() and quicks...

question_answer

Q: Find regular grammars for the following languages on {a, b}: L = {w : na (w) and nb (w) are both eve...

A: Regular grammar for the language L = {W: na (w) and nb (w) are both even} is as follows:

question_answer

Q: Normalization               Repair the ER Diagrams into at least 1nf, 2nf and 3nf Give explanations...

A: Hi due to lack of adequate information we are unable to provide any solution. Please provide us more...

Sorry about that. What wasn’t helpful?