JSch jsch = new JSch();//创建对象
com.jcraft.jsch.Session session = jsch.getSession(用户名,ip, 22);//获取session
session.setPassword(密码);//设置密码
Properties sshConfig = new Properties();
* sshConfig加密和公钥 sshConfig.setProperty(key, value)
* */
//sshConfig.put("StrictHostKeyChecking", "no");
<