I want to open up a SSH tunnel in a Java program, so that the rest of the system will also have access to the connection (e.g. if I forward a port for a database to the localhost I should be able to open the database in another program)... In other words what I need to do it to create a Java wrapper for something like the unix command ssh. However I need the program to be cross platform, so if possible I would like to use a library from Java.
Is this possible (I have been looking at different libraries, but have not been able to create the tunnel so the rest of the system can use it yet)