2、ort com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; import com.jcraft.jsch.Session; import com.jcraft.jsch.SftpException; import com.shonetown.common.util.log.EventLog; /** * In order for SSH2 tunneling to function correctly one must ensure that the * following line is unco
3、mmented in /etc/ssh/sshd_config : * --------------------------CUT------------------------------- * # Change to yes to enable tunnelled clear text passwords * PasswordAuthentication yes * --------------------------CUT------------------------------- * Otherwise the initiation of the tunnel w
4、ill fail with * "SSH Initialization failed, try again? * com.jcraft.jsch.JSchException: Auth fail" * @author aimer.xu * */ public class SftpHelper extends Thread { private static EventLog log = new EventLog(SftpHelper.class); private String host; private String username;
5、 private String password; private String location; private int port; private String knowHosts; private String osName; private List filenames = new ArrayList(); public SftpHelper(String host, String username, String password, int port) {