Hiya. I'm trying to make my own project management system XD (let me explain). It'll be for my own personal projects, I want to be able to store them on my server via sftp. Basicly, I'm using JSCH to manage this. When I try:
I'm getting auth failure messages...any ideas?JSch jsch = null; Session session = null; Channel channel = null; ChannelSftp c = null; try{ System.out.println("Checking for Projects Directory"); jsch = new JSch(); session = jsch.getSession(puser, pserver, pport); session.setPassword(ppassword); java.util.Properties config = new java.util.Properties(); config.put("StrictHostKeyChecking", "no"); session.setConfig(config); session.connect(); channel = session.openChannel("sftp"); channel.connect(); c = (ChannelSftp) channel; c.mkdir("/home/" + puser + "/Projects/"); } catch (Exception ex){ System.out.println("Error locating Projects Folder: " + ex.getStackTrace() + ex.getMessage()); System.out.println("Could not make project on server. Please restart the program."); }