I'm developing java program to connect with windows server over ssh. For this I used jcraft on java. And the ssh server is copSSH. The implementation throws
Error: com.jcraft.jsch.JSchException: Algorithm negotiation fail
error on java. At the same time it shows
fatal: Unable to negotiate with 192.168.28.111: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc [preauth]
on CopSSH.
Java code block
public void sshExecPassword(String host, String USERNAME, String PASSWORD, String command) {
    App objApp = new App();
    int port = 22;
    try {
        /**
         * Create a new Jsch object This object will execute shell commands
         * or scripts on server
         */
        JSch jsch = new JSch();
        /*
         * Open a new session, with your username, host and port Set the
         * password and call connect. session.connect() opens a new
         * connection to remote SSH server. Once the connection is
         * established, you can initiate a new channel. this channel is
         * needed to connect to remotely execution program
         */
        java.util.Properties config = new java.util.Properties();
        config.put("StrictHostKeyChecking", "no");
        Session session = jsch.getSession(USERNAME, host, port);
        session.setConfig(config);
        session.setPassword(PASSWORD);
        session.connect();
        // create the excution channel over the session
        ChannelExec channelExec = (ChannelExec) session.openChannel("exec");
        // Gets an InputStream for this channel. All data arriving in as
        // messages from the remote side can be read from this stream.
        InputStream in = channelExec.getInputStream();
        // Set the command that you want to execute
        // In our case its the remote shell script
        String str = command;
        channelExec.setCommand(str);
        channelExec.connect();
        // Read the output from the input stream we set above
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String line;
        while ((line = reader.readLine()) != null) {
            System.out.println(line);
        }
        // retrieve the exit status of the remote command corresponding to
        // this channel
        int exitStatus = channelExec.getExitStatus();
        // Safely disconnect channel and disconnect session. If not done
        // then it may cause resource leak
        channelExec.disconnect();
        session.disconnect();
        if (exitStatus < 0) {
            System.out.println("Done, but exit status not set! " + exitStatus);
            objApp.writeLogs("120","Done, but exit status not set! ");
        } else if (exitStatus > 0) {
            System.out.println("Done, but with error!");
            objApp.writeLogs("120","Done, but with error!");
        } else {
            System.out.println("Done!");
            objApp.writeLogs("121","SSH connection successful");
        }
    } catch (Exception e) {
        System.err.println("Error: " + e);
        final StringWriter sw = new StringWriter();
        final PrintWriter pw = new PrintWriter(sw, true);
        e.printStackTrace(pw);
        objApp.writeLogs("120", sw.getBuffer().toString());
    }
}
And the CopSSH host following versions
OpenSSH_7.1p2, OpenSSL 1.0.2e 3 Dec 2015
Can any one suggest a fix for it?
 
    