How to SSH tunnel and connect to a database using IntelliJ and JDBC?

前端 未结 3 1640
攒了一身酷
攒了一身酷 2021-02-20 14:15

I\'m having issues connecting to a database hosted on a server using IntelliJ and JDBC. With the command line, the command:

ssh username@server -L 11100:ct1:2801         


        
3条回答
  •  甜味超标
    2021-02-20 15:08

    Do you connect to SSH server from a java client like SSHJ (https://github.com/hierynomus/sshj) ?

    The URL on your DriverManager seems wrong: try port 11100 instead.

提交回复
热议问题