java.io.IOException: End of IO Stream Read

com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read

把你的代码贴出来看下

sshSession.setPassword(password); Properties sshConfig = new Properties(); sshConfig.put("kex", "diffie-hellman-group1-sha1"); sshConfig.put("StrictHostKeyChecking", "no"); sshSession.setConfig(sshConfig); sshSession.connect(20000);

如果是建立连接就出现问题,有可能你的jsch版本太低,换个版本

试试这个

 JSch jsch = new JSch();
            session = jsch.getSession(user, ip, port);
            session.setPassword(pwd);
            Properties config = new Properties();
            config.put("StrictHostKeyChecking", "no");
            session.setConfig(config);
            session.connect(10000);