I have written two methods for issuing an ssh command -- one using jsch version 0.1.31 and another using j2ssh-core version 0.2.9 -- and neither of them get past the connect step so I assume it's not an authentication problem since I don't even get to that step. With the code which uses the jsch library I get a JSchException: Algorithm negotiation fail, and with the code which uses the sshtools library I get an IOException: Socket is EOF. I have no clue as to what either of these exceptions indicate, and have found nothing so far using Google, amiling list archives, etc. However if I try the same ssh command at command line I have no errors. So it seems that my error is somehow related to running the Java code and not with the ssh configuration, but I'm not certain and hoping that someone reading this can guide me to a way of determining whether or not that's the case, and if so how to fix things.
When I run 'ssh -V' on both the local machine where I am running my Java codes as well as on the remote machine where I am trying to run the ssh commands I get the following result:
Sun_SSH_1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090801f
Is there a way to determine whether or not this version of OpenSSL is compatible with either or both of the ssh libraries I'm using for this task?
Below are snippets of the code I have written -- I think they're OK but maybe I've done something wrong at the Java level and if so then please point it out to me:
Thanks in advance for any suggestions or ideas.