0

I need to access the remote MYsql database from java which can be accessed only through ssh SSH tunneling works perfectly fine for my application as most of the linux systems come with built in ssh client. java.sql.Connection extension for SSH

what if i need to access the database from windows system, by using putty or some other ssh client.

can we do ssh tunneling in windows system as if in ubuntu systems.:)

Community
  • 1
  • 1
forum.test17
  • 2,119
  • 6
  • 30
  • 62

2 Answers2

1

Yes, you can, see Using PuTTY under Windows to create an SSH tunnel to your NetManager. Basically you need to set up a tunnel to the mysql port and then you can use the JDBC as natural without it being aware of the tunneling happening

Jonas
  • 121,568
  • 97
  • 310
  • 388
LordDoskias
  • 3,121
  • 3
  • 30
  • 44
-1

There are plenty of SSH clients for java:

Probably you can take a look and see who is going to work for you, but I think jsch could solve your probelm. See examples here

Valchev
  • 1,490
  • 14
  • 17