views:

125

answers:

3

Is it possible to make a ssh connection to a server with java?

+3  A: 

Yes, I used http://sourceforge.net/projects/sshtools/ in a Java application to connect to a UNIX server over SSH, it worked quite well.

theomodsim
Ok i will try it :) thx
+1  A: 

jsch and sshJ are both good clients. I'd personally use sshJ as the code is documented much more thoroughly.

jsch has widespread use, including in eclipse and apache ant. I've also had issues with jsch and AES encrypted private keys, which required re-encrypting in 3DES, but that could just be me.

ClutchDude
ok the jsch library worked fine and was very easy to implement. thank you for your answer.
A: 

To make connection to Java servers, you need an implementation of SSHD (ssh client is not enough). You can try Apache SSHD,

http://mina.apache.org/sshd/

Because sshd is already running on most systems, an easier alternative is to connect to the server through a SSH tunnel.

ZZ Coder