Menu

How to provide SSH credentials along with DB user credentials?

David
2020-08-31
2020-09-01
  • David

    David - 2020-08-31

    I am trying to use SQLeo to connect to a database which lives on a remote server.

    The "new connection" dialog for SQLeo allows me to enter credentials for the database, but no user/passwd for actually getting data from the remote server. In my case, the "db user" and the "server user" credentials are different.

    I notice a couple other threads in this forum which exhibit the same symptoms as I see:

    https://sourceforge.net/p/sqleo/discussion/general/thread/e8df1c4937/

    and a much older one:

    https://sourceforge.net/p/sqleo/discussion/general/thread/e75dae49/

    I, too, get the java.lang.NullPointerException, and there is no data to be queried, even though SQLeo shows that I am "connected" to the database itself.

    With DBeaver (CE), for example, there are two dialogs, one for the database, and one for SSH, to get on to the server. So — how do I get SQLeo to query a database on a remote server?

    Thanks for any help with this!

    [Using SQLeoVQB.2019.01.rc1 on MacOS 10.14.6 Mojave.]

    Update - I just set up SQLeo on my Ubuntu 18.04 LTS (same SQLeo version), and got this error message: org.postgresql.util.PSQLException: An error occurred while setting up the GSS Encoded connection. The only web-search hit on that leads to an IBM support article. Any clues?

     

    Last edit: David 2020-08-31
    • PAscal

      PAscal - 2020-08-31

      Hi David,
      thank you for your interest in SQLeo that has not been updated for months (I apologize).

      Regarding your first question, to be honest, SSH support hasn't implemented.
      So to get a chance to use it in SQLeo (I'm not an expert), you have to :
      - use a JDBC Driver that supports it (You didn't told us which database you are using), if any
      - implement SSH tunneling toward your remote serveur, and then use a connection url refering to this tunnel.

      maybe thoses other threads may help
      https://sourceforge.net/p/sqleo/discussion/general/thread/7cc61b96/
      https://sourceforge.net/p/sqleo/discussion/general/thread/a8540d29/

      I'll start an other thread, for the other problem
      Regards
      PAscal

       
      🎉
      1
  • David

    David - 2020-09-01

    Did it! Thanks - those links were a real help, but they eventually led me to the Postgresql help on SSH tunnels. Putting that all together, I came up with a command line (in shell on Ubuntu) that looks like this:

    $ ssh -L 63333:localhost:5432 serverid@example.com -p 22
    

    where serverid is my login identity on the remote machine, -p prompts for password authentication, and 22 is the port I login to.

    Then, in SQLeo, my connection profile looks like this:

    jdbc:postgresql://localhost:63333/dbname
    

    with my distinct database user credentials. Now functioning well! Thanks for the help! It would be worth adding something about this in the docs, as it looks like I'm not alone in needing help with this. So glad it works now! Thanks again.

     

Anonymous
Anonymous

Add attachments
Cancel