Om Prakash Bijawat wrote:Thanks Richard for you reply...
But this is not working for me...
Here is my code
Jsch jsch =new JSch();
Session session = jsch.getSession(userName,host);
session.setPassword(password);
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
config.put("PreferredAuthentications", "password");
session.setConfig(config);
session.connect();
Channel channel = session.openChannel("sftp");
ChannelSftp sftp = (ChannelSftp) channel;
sftp.connect();
System.out.println("Pwd : "+sftp.pwd());
But that code does not try to make a directory! And what does not work? What are the symptoms of 'does not work' ? Please please please tell the whole story or I am wasting my time.
Edit: your edit pulled the rug from under my feet!