Results 1 to 4 of 4
  1. #1
    Shivkumar is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Angry Jsch and Secure File Transfer Protocol [SFTP]

    HI,

    i used a small SFTP Client(java) to Connect to the SFTP Server and transfer a file. i can transfer the file successfully, but
    how do confirm that the file content are secure.

    Client : java SFTP Clinet using Jsch lib
    Server : FTPShell Server

    client program is

    import com.jcraft.jsch.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;

    public class SftpClient {

    public static void main(String args[]) {

    JSch jsch = new JSch();
    Session session = null;

    try {
    session = jsch.getSession("user", "host",port);

    session.setConfig("StrictHostKeyChecking", "no");

    session.setPassword("pass");

    session.connect();

    Channel channel = session.openChannel("sftp");
    channel.connect();
    ChannelSftp sftpChannel = (ChannelSftp) channel;

    File file = new File("c:\\hello.txt");
    sftpChannel.put(new FileInputStream(file),"helloo.txt");
    sftpChannel.exit();
    session.disconnect();
    } catch (JSchException e) {
    e.printStackTrace();
    } catch (SftpException e)
    {
    e.printStackTrace();
    } catch(FileNotFoundException e)
    {
    e.printStackTrace();
    }
    }
    }

    thanks in advance

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    10

    Default

    Use a packet sniffer such as ethereal.

  3. #3
    Shivkumar is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default

    hi,

    Thanks for the reply,

    Can you please elaborate the sentence.As i am beginner could not understand what exactly you are suggesting.


    Thanks in Advance

    Shivkumar

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    10

    Default

    An external tool that monitors your network traffic. If you can "read" the file transfer packets that you find using that they are not encrypted. If they are just a bunch of symbols, they are.

Similar Threads

  1. file transfer
    By prashant in forum Networking
    Replies: 3
    Last Post: 12-10-2009, 07:46 AM
  2. File -Server Protocol
    By cbn20 in forum Networking
    Replies: 3
    Last Post: 11-21-2009, 08:23 PM
  3. tcp file transfer
    By ddj in forum Networking
    Replies: 2
    Last Post: 03-20-2009, 03:10 PM
  4. data loss in the secure file transfer using java
    By antony75 in forum Networking
    Replies: 4
    Last Post: 02-09-2009, 07:56 AM
  5. Reliable Data Transfer Protocol
    By ladesidude in forum Networking
    Replies: 4
    Last Post: 10-26-2008, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •