2 Replies Latest reply: Jan 23, 2013 7:16 AM by gimbal2 RSS

    Write a file to SFTP Server

    985432
      Hi experts,

      I'm using EJB 3.1 and JBOSS 7.1.. Is it possible to create and write a file(CSV) directly to SFTP server?

      Regards
        • 1. Re: Write a file to SFTP Server
          Kayaman
          Get a SFTP library and see for yourself.
          • 2. Re: Write a file to SFTP Server
            gimbal2
            user2000609 wrote:
            Hi experts,

            I'm using EJB 3.1 and JBOSS 7.1.. Is it possible to create and write a file(CSV) directly to SFTP server?
            Yep. I would recommend using JSCH, but that API is seriously lacking in documentation. There is example code in there though, and you can look at the Apache commons-vfs API source which has an SFTP filesystem that uses JSCH. I wouldn't recommend using commons-vfs itself by the way; its not really well designed in my opinion.