AUTH TLS ftp client?

I've made my pure-ftpd work properly (with a virtual user database and ssl/tls), but I haven't been able to find any proper ftp client for the unix platform
the most important thing is AUTH TLS support!
a gtk2 interface would be nice, but it's not mandatory...
any tips?

I'm not using any ftp client with tls currently but let me search...
First this is a list and comparision of ftp clients with support for tls auth for all systems:
http://www.ford-hutchinson.com/~fh-1-pf … tml#client
These look promising:
Kermit http://www.columbia.edu/kermit/ck80.html
Ftp-tls (from Openbsd) http://www.runestig.com/osp.html
Kasablanca (with gui but for kde) http://kasablanca.berlios.de/features.html
Bsdftpd has cli ftps client http://bsdftpd-ssl.sc.ru/
Secureftp (Java gui) http://www.glub.com/products/secureftp/
Lftp (it should automatically recognize tls) http://lftp.yar.ru/
Iglooftp (nice gtk2 gui, commercial? closed source?) http://www.iglooftp.com/unix/download.html
Kftpgrabber (gui, kde) http://kftpgrabber.sourceforge.net/features.php
Pftp + gui clients (ncurses, gtk, qt ?) http://pftp.sourceforge.net/index.html
Tls wrapper (allows any ftp client to use tls) http://tlswrap.sunsite.dk/
BTW it's also good to read pure-ftpd readme first :-)
http://www.pureftpd.org/README.TLS (there is tested clients list)...
Maybe there are more. List of ftp clients for linux:
http://www.usinglinux.org/ftp/
http://www.linuxsoft.cz/en/sw_list.php?id_kategory=9
Maybe some of them support tls too.

Similar Messages

  • FTPS failing with Error: ...FTPEx: 'AUTH TLS': command not understood !!

    Hi,
    I am trying to send a file over FTPS (FTP using SSL/TLS) .
    But it fails with the following error in RWB - Communication Channel monitoring:
    Error when getting an FTP connection from connection pool: com.sap.aii.af.lib.util.concurrent.ResourcePoolException:
    Unable to create new pooled resource: FTPEx: 'AUTH TLS': command not understood
    I running NW711_05 and my FTP Connection Parameters are as follows:
    Server: OurServerName
    Port: 21
    Data Connection: Passive {even tried Active but got the same error}
    Timeout: 20
    Connection Security: FTPS (FTP Using SSL/TLS) for control connection
    X Use X.509 Certificate for Client Authentication
    Keystore: service_ssl
    X.509 Certificate and Private Key: ssl-credentials
    Do I need to do any specific configuration/settings on the receiving FTP-server side?
    Kind regards,
    Joe

    Hi Rajesh,
    Thx for your speedy response! I started out by deselecting the certificate checkbox and changing the port no from 21 to 990, this of course generated a different error message:
    Unable to create new pooled resource: ConnectException: Connection refused
    which I believe is because connection is not configured for port 990.
    Anyone else has any suggestions as to how to proceed?
    Regards,
    Joe

  • Does XI support FTP over SSL with Command AUTH TLS??

    Hi All,
    Can we change Command AUTH TLS to AUTH SSL in the Command Order of receiver FTP adapter when you select FTPS (FTP using SSL/TLS) for Controal and Data Connection??
    We are able to transfer business documents to bank's FTP server (Following RFC 2228 standards) using WS FTP Pro (I think follows RFC 959 and 1123 standards) which using AUTH SSL in Command order.
    We did go through SAP note 821267 (FAQ for XI 3.0 / PI 7.0 File Adapter)...question number 33 address about the "AUTH TLS" command. But we not getting the same error. We get different as in this forum:
    Re: Error: Message processing failed: FTPEx: PBSZ=0
    Can someone please confirm if this is the issue with FTP RFC standarads?? Or can we coustomize FTPS adapter to send AUTH SSL command??
    Thank you,
    Indrasena Janga

    Dear Andy,
    I am also looking for the same information.
    Could you please share with ,if u have got anything related....
    Hi Experts,
    Pls share your exp with us if u have any....
    Regards,
    Srinivas

  • Can Dreamweaver do explicit SSL/TLS FTP Connections?

    Hi,
    I posted this before, but never got a clear answer. Then again, my question wasn't phrased very clearly.
    I am currently unable to connect to our testing server via Dreamweaver (but can via CuteFTP) because :
    "The FTP settings for the server are explicit SSL/TLS (sometimes called Auth/TLS) and port 500."
    That's what the tech guy at the other end emailed me. So while I am able to specify the port via ":" prefix in the FTP host name, I am unable to find anything that allows me to select explicit SSL/TLS encryption. This is what's preventing me from connecting with Dreamweaver CS4.
    Does anyone know of a way for me to connect via explicit SSL/TLS? Perhaps a Dreamweaver extension, even?
    Thanks!

    I just sent the following request in to the engineers.
    *******Enhancement / FMR*********
    I'm webmaster for a new client, and couldn't connect to their servers properly with Dreamweaver. When I asked their tech people on the other end why I'm having such difficulty, they wrote back :
    "The FTP settings for the server are explicit SSL/TLS (sometimes called Auth/TLS) and port 500."
    According to Adobe Forums community expert David Powers, "FTP is not the strongest of Dreamweaver's features. It supports Secure FTP (SFTP) and the IPv6 protocol, but not SSL. I suggest that you submit a feature request to Adobe through the official form."
    Because of this, I will more than likely have to find other software than Dreamweaver to execute my tasks.
    Please include the necessary encryption methods in a future update, or even an extension.
    Thanks!

  • Problems implementing AUTH TLS and AUTH SSL in VSFTPD

    I have followed the common recommendations to require ssl on login and ssl on data, I have set made a self-signed certificate and key in a single file and set the pointer. When FireFTP client set up for TLSv1 tries to connect the following is the result (debug info in client):
    DEBUG: ({account:" FireFTP Profile Name ", host:"6#.5#.##. ### ", port:"21", login:"bbop", password:"", anonymous:false, security:"authtls", pasvmode:true, ipmode:false, treesync:false, localdir:"", remotedir:"", webhost:"", prefix:"", downloadcasemode:0, uploadcasemode:0, encoding:"UTF-8", notes:"", timezone:0, folder:"", privatekey:""})
    DEBUG: gConcurrent:2, gMaxCon:10, gRefreshMode:true, gTempPasvMode:true, gLoadUrl:false, fileMode:2, hiddenMode:true, keepAliveMode:true, networkTimeout:30, proxyHost:, proxyPort:0, proxyType:, activePortMode:false, activeLow:1, activeHigh:65535, reconnectMode:true, sessionsMode:true, timestampsMode:false, useCompression:true, integrityMode:true, userAgent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729)
    *220 This FTP Site provided by the State University System Board of Governors, Information Resource Management. Information available for download and uploaded by authorized users is subject to all state and federal privacy regulations and use of this site implies user understanding and acceptance of all responsibilities therein.*
    AUTH TLS
    *234 Proceed with negotiation.*
    PBSZ 0
    *200 PBSZ set to 0.*
    USER bbop
    *331 Please specify the password.*
    PASS (password not shown)
    *230 Login successful.*
    FEAT
    *211-Features:
    AUTH SSL
    AUTH TLS
    EPRT
    EPSV
    MDTM
    PASV
    PBSZ
    PROT
    REST STREAM
    SIZE
    TVFS
    211 End*
    PWD
    *257 "/"*
    TYPE A
    *200 Switching to ASCII mode.*
    PROT P
    *200 PROT now Private.*
    PASV
    *227 Entering Passive Mode (6#,5#,##,###,216,96)*
    LIST -al
    <<<20 seconds later.......>>>
    QUIT
    The pam.vsftpd looks as follows:
    #%PAM-1.0
    auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd.ftpusers onerr=succeed
    auth required pam_stack.so service=system-auth
    auth required pam_shells.so
    account required pam_stack.so service=system-auth
    session required pam_stack.so service=system-auth
    and the vsftpd.conf has the following associated with ssl and chroot jailing:
    chroot_local_user=YES
    pam_service_name=vsftpd
    userlist_enable=YES
    listen=YES
    tcp_wrappers=YES
    ssl_enable=YES
    allow_anon_ssl=NO
    force_local_data_ssl=YES
    force_local_logins_ssl=YES
    ssl_tlsv1=YES
    ssl_sslv2=NO
    ssl_sslv3=NO
    rsa_cert_file=/etc/vsftpd/vsftpd.pem
    pasv_address=6#.5#.##.###
    I must be missing something, but I cannot figure out what! I need to have this site up for users in 14 hours!!!!!

    The problem was not in the vsftpd settings really. It was a network security (firewall) issue.
    I defined pasv_min_port=#### and pasv_max_port=#### in vsftpd.conf. I had my network administrator open the ports in this range for TCP for this server.
    Clients connecting pasv/tlsv1 now have no issues.

  • StartHandshake() hangs on FTPS Client implementation

    Hi,
    I'm working on developing a small FTPS client test program that connects to an FTP server using explicit SSL. I first connect with a standard socket, then send the message "AUTH TLS" I get back "234 AUTH TLS-C/TLS OK." meaning the server is ready to switch to a secure connection. Immediately after, I call the startHandshake() method and that's where the process gets stuck (or if I set the timeout interval to a minute it'll eventually time out.) I can connect fine with SecureFTP (based on Java) to the FTP Server using the same host, port, and with explicit SSL. Any ideas on what could cause this?
    Here's a relevant portion of the code based off of the Apache FTPClient source:
    From my test file:
    FtpsClient peoplesFTP = new FtpsClient();
    peoplesFTP.connect(HOST, PORT);Which calls this inside FtpsClient.java
    public void connect(String address, int port) throws SocketException, IOException
              super.connect(address, port);
              System.out.println(this.getReplyString());
              this.secure();
         }And the secure method inside Ftpsclient.java
         public void secure() throws IOException
              this.sendCommand("AUTH", "TLS");
              System.out.println(this.getReplyString());
              SSLSocket socket = (SSLSocket) this.context.getSocketFactory().createSocket(this._socket_, this.getRemoteAddress().getHostAddress(), this.getRemotePort(), true);
              socket.setSoTimeout(10000);
              try {
                   socket.startHandshake();
              } catch (SocketTimeoutException e) {
                   System.out.println("Socket timed out");
              this._socket_ = socket;
              this._controlInput = new BufferedReader(new InputStreamReader(socket.getInputStream(), getControlEncoding()));
              this._controlOutput = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), getControlEncoding()));
              this.setSocketFactory(new FtpsSocketFactory(this.context));
              this.sendCommand("PBSZ", "0");
              this.sendCommand("PROT", "P");
         }

    HELP!!!
    I am using the FTPS Client implementation and have the (-Djavax.net.debug=all) turned on. From what I can see in the logs it's doing the handshake and accepting the cert. However, the logs it just hangs and prints out:
    AUTH TLS
    Then the socket times out... Help... what am I missing? Any help and/or guidance would be greatly appreciated
    Here's my code snippet:
    ftps = new FTPSClient(false);
    ftps.setRemoteVerificationEnabled(false);                              
    int reply = 0;
    // Trust All Server Certs
    TrustManager[] trustAllCerts = new TrustManager[] {
         new X509TrustManager() {
              public X509Certificate[] getAcceptedIssuers() {
                   return null;
              public void checkClientTrusted(X509Certificate[] certs, String authType) {
                   // everything is trusted
              public void checkServerTrusted(X509Certificate[] certs, String authType) {
                   // everything is trusted
    // SSL Instance
    SSLContext sc = SSLContext.getInstance("TLSv1");
    sc.init(null, trustAllCerts, new SecureRandom());
    SSLSocketFactory socketFactory = sc.getSocketFactory();
    Socket plain = new Socket (server, port);
    SSLSocket socket = (SSLSocket) socketFactory.createSocket(plain, server, port, true);
    socket.setSoTimeout(10000);
    try {
         socket.startHandshake();
         logger.info("Start Socket HandShake");
    } catch (SocketTimeoutException e) {
         logger.error("Socket timed out");
    ftps.setSocketFactory(socketFactory);
    TrustManager trustManager = trustAllCerts[0];
    ftps.setTrustManager(trustManager);
    ftps.setBufferSize(1000);                              
    ftps.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
    ftps.connect(server, 990);
    socket.close();
    System.out.println("Connected to " + server + ".");

  • Ftp Client Example

    Anybody interested in playing with my tool implementation of a ftp client
    in forte feel free to email me, and I will send you it. I had tried to
    post it to the user group, but it exceeded the size limitations (40000).
    Could those of you who emailed me already please do so again. I deleted
    your emails in anticipation of being able to post it to the user group.
    Thank you,
    Chris Henson
    ATG Solutions Inc.
    [email protected]
    [email protected] (mail me here)
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    Well, it appears that the 40 bit trial version of the
    FTP server software was part of the problem. After I
    found a trial FTP server version that had 128 bit
    encrytpion, it no longer hung. However, I still get
    an "Unknown SSL message, plaintext connection?" error
    after I call startHandshake() after the "AUTH TLS-P"
    or "AUTH SSL" command. However, setting the server
    for implicit ssl and creating the ssl socket from the
    beginning works just fine. Do secure sockets not work
    with explicit SSL? Anyone have any ideas?
    Thanks!
    Anna I exactly get the same problem. In inmplicit SSL mode, eveything works just fine. But when I configure the server in explicit SSL mode, and thta my client is developped to create such connections, it doesn't work nad i get the same error message: "Unknown SSL message, plaintext connection?". Have you worked out this problem ???
    I'm waiting for your answer

  • FTP client which supports NTLM through WSA

    We are looking into a FTP Client which supports NTLM in combination with
    our WSA proxy servers.
    With IE or Firefox browser it works fine.
    Currently i.am testing Filzilla version 3.3.4.1 "http://filezilla-project.org" but i can't
    seem to get it to work.
    On the internet there is not much information available.
    Anyone have expierence with FTP clients?

    Have contacted support and they gave me the following information:
    You should be able to use the Filezilla FTP client along with NTLM authentication. The settings for Filezilla would depend on
    the below factors & settings:
    Using Native FTP Proxy on IronPort
    1)      Check the Native FTP port and authentication mechanism configured on IronPort under:
    a.       GUI --> Security Services --> FTP proxy
    b.      Check the Port and authentication format
    2)      Based on the authentication format, you would need to configure settings as the below knowledge-base article:
    a.       http://tinyurl.com/nvbt5r
    Using FTP over HTTP CONNECT in Filezilla
    1)      You can configure this in Filezilla under:
    a.       'Edit' --> 'Settings' --> Generic Proxy --> HTTP 1.1 Using CONNECT method
    2)      In this section you can specify the NTLM credentials  in the below section:
    a.       Proxy Username (DOMAIN\username) and Proxy password 
    So i tried the native ftp option with
    Ironport ftp port 8021 with checkpoint auth.
    In filezilla under FTP Proxy,
    Proxy host %ipaddress%:8021
    Proxy user %domain%\%userid%
    Proxy pas  **********
    Then i get following in Filezilla log:
    Status: Using proxy IPADDRESS:8021
    Status: Connecting to IPADDRESS:8021...
    Status: Connection established, waiting for welcome message...
    Response: 220 FTP Server message!!!
    Command: USER anonymous@domain\[email protected]: 331 User name okay, need password.
    Response
    Command: PASS ***************************
    Response: 530 Login denied
    Error: Critical error
    Error: Could not connect to server
    So i think the following part goes wrong:
    Command: USER anonymous@domain\[email protected]
    If i have the correct solution i wil post it here!

  • Issue with Ftp Client / Server using Sockets

    I have developed a Ftp Client and a Ftp Server. The client Connects to the Ftp Server and sends files to the ftp server. It is a multi threaded server and can have multiple clients connecting to it.
    If a client goes down...the server waits till the client comes up
    Similarly the client waits if a server goes down and reconnects when the server is again up and running
    i am having a strange issue here. When two clients go down and reconnect to the server...They take a long time to connect and transferring of files takes a long time...
    Other wise in all other scenarios the duo work properly.
    Any feedback and suggestion about this strange issue from all you java gurus out there will be deeply appreciated.
    Here is the client code
    import java.net.*;
    import java.net.Socket;
    import java.net.InetAddress;
    import java.io.*;
    import java.io.File;
    import java.util.*;
    import java.lang.*;
    import java.lang.Object;
    import javax.crypto.*;
    import java.util.regex.*;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.File.*;
    import java.nio.channels.FileLock;
    public class  FTPClient {
         public static void main(String[] args) throws Exception
              Timer timer = new Timer("Test Timer");
              timer.scheduleAtFixedRate(new TimerTask()
                   private int counter = 0;
                                            public void run() {
                                                                     try     {                                                                                
                                                                              System.out.println(counter++);
                                                                               Socket soc=new Socket("xxx.x.x.xx",5217);
                                                                               System.out.println("Socket Initialised.");          
                                                                               transferfileClient t=new transferfileClient(soc);
                                                                               t.SendFile();
                                                                               System.out.println("run complete.");                                                                           
                                                                          catch(Exception ex)
                                                           }, 10000, 40000);
         static class transferfileClient
         Socket ClientSoc;
         DataInputStream din;
         DataOutputStream dout;
         BufferedReader br;
         transferfileClient(Socket soc)
              try
                   ClientSoc=soc;
                   din=new DataInputStream(ClientSoc.getInputStream());
                   dout=new DataOutputStream(ClientSoc.getOutputStream());
                   br=new BufferedReader(new InputStreamReader(System.in));
              catch(Exception ex)
         //encrypto routine starts
    class DesEncrypter {
           Cipher ecipher;
            Cipher dcipher;   
            // 8-byte Salt
            byte[] salt = {
                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
                (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
            // Iteration count
            int iterationCount = 19;   
            DesEncrypter(String passPhrase) {
                try {
                             // Create the key
                             KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                             SecretKey key = SecretKeyFactory.getInstance(
                             "PBEWithMD5AndDES").generateSecret(keySpec);
                             ecipher = Cipher.getInstance(key.getAlgorithm());
                             dcipher = Cipher.getInstance(key.getAlgorithm());   
                             // Prepare the parameter to the ciphers
                             AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);   
                             // Create the ciphers
                             ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                             dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
                } catch (java.security.InvalidAlgorithmParameterException e) {
                } catch (java.security.spec.InvalidKeySpecException e) {
                } catch (javax.crypto.NoSuchPaddingException e) {
                } catch (java.security.NoSuchAlgorithmException e) {
                } catch (java.security.InvalidKeyException e) {
            // Buffer used to transport the bytes from one stream to another
            byte[] buf = new byte[1024];   
            public void encrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes written to out will be encrypted
                    out = new CipherOutputStream(out, ecipher);   
                    // Read in the cleartext bytes and write to out to encrypt
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
            public void decrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes read from in will be decrypted
                    in = new CipherInputStream(in, dcipher);   
                    // Read in the decrypted bytes and write the cleartext to out
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
    }     //encryptor routine ends     
         void SendFile() throws Exception
                   try
                   String directoryName; 
                   // File object referring to the directory.
                   String[] files;        // Array of file names in the directory.        
                   //directory = new File ( "C:\\FTP\\" ) ; 
                   File directory1 = new File("C:\\FTP");
                        boolean successmk = directory1.mkdir();
                        if (!successmk) {
                             // Directory creation failed /Already Exists
                        File directory = new File("C:\\FTP\\ftpc");
                        boolean successmk1 = directory.mkdir();
                        if (!successmk1) {
                             // Directory creation failed /Already Exists
                   //directory = new File ( "E:\\FTP-encrypted" ) ;           
                if (directory.isDirectory() == false) {
                    if (directory.exists() == false)
                       System.out.println("There is no such directory!");
                    else
                      System.out.println("That file is not a directory.");
                else {
                    files = directory.list();
                    System.out.println("Files in directory \"" + directory + "\":");
                    for (int i = 0; i < files.length; i++)
                             String patternStr = "xml";
                             Pattern pattern = Pattern.compile(patternStr);
                             Matcher matcher = pattern.matcher(files);
                             boolean matchFound = matcher.find();
                                       if (matchFound) {                                   
                                       System.out.println(" " + files[i]);                                        
                                       String filename;
                                       filename=files[i];                                   
                                       File f=new File(directory,filename);
                                       FileLock lock = null;                                   
                                       FileOutputStream fos = new FileOutputStream(f, true);
                                       lock = fos.getChannel().tryLock();
                                                 if (lock == null) {
                                                 System.out.println(" Failed to get the file lock: means that the file is locked by other instance.");
                                                 fos.close();
                                                 else
                                                                     InetAddress addr = InetAddress.getLocalHost();                                                                      
                                                                               // Get IP Address
                                                                               //byte[] ipAddr = addr.getAddress();
                                                                               String ip= addr.toString();                                                                      
                                                                               // Get hostname
                                                                               //String hostname = addr.getHostName();
                                       System.out.println(" Lock Acquired.");
                                       lock.release();
                                       fos.close();
                                       dout.writeUTF("SEND");
                                            dout.writeUTF(ip);
                                       dout.writeUTF(filename);
              //String msgFromServer=din.readUTF();          
    DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
    // Encrypt
              FileInputStream fino=new FileInputStream(f);
              encrypter.encrypt(fino,
    new FileOutputStream("ciphertext.txt"));               
              fino.close();
              FileInputStream fin=new FileInputStream("ciphertext.txt");          
              int ch;
              do
                   ch=fin.read();
                   dout.writeUTF(String.valueOf(ch));
              while(ch!=-1);
              fin.close();          
              String option;
                        option=din.readUTF();
                             if((option.compareTo("Delete")==0))     
                                  boolean success = (new File("ciphertext.txt")).delete();
                                  boolean success1 = f.delete();
                                  if (success) {
                                  System.out.println("File Sent ...");
                                  if (success1) {
                                  System.out.println("--File deleted from Client ...");
         for (int j = 0; j < 999999999; j++){}
                                       }//pattermatch loop ends here
    else
                             { //System.out.println("   " + "Not an XML file-------->" +files[i]);
    for (int jb = 0; jb < 111999999; jb++){}
              }// for loop ends here for files in directory
                   }//else loop ends for directory files listing               
         System.out.println("sendfile finished...");
         return;
         }               catch(Exception ex)          {ex.printStackTrace();}                    
         }//sendfile ends here     
         public void displayMenu() throws Exception
                   System.out.println(" Send File");                    
                        SendFile();
                        return;          
    And here is the server code...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    import java.text.DateFormat;
    import java.text.Format;
    import java.lang.Object;
    import java.lang.*;
    import javax.crypto.*;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    public class FTPServer
    {     public static void main(String args[]) throws Exception
         {     ServerSocket soc=new ServerSocket(5217);
              System.out.println("FTP Server Started on Port Number 5217");
              while(true)
                   System.out.println("Waiting for Connection ...");
                   transferfile t=new transferfile(soc.accept());               
    class transferfile extends Thread
         Socket ClientSoc;
         DataInputStream din;
         DataOutputStream dout;     
         transferfile(Socket soc)
         {     try
              {     ClientSoc=soc;                              
                   din=new DataInputStream(ClientSoc.getInputStream());
                   dout=new DataOutputStream(ClientSoc.getOutputStream());
                   System.out.println("FTP Client Connected ...");
                   System.out.println("External IP of Client ..." + ClientSoc.getInetAddress());
                   //System.out.println("FTP Client Connected ..." + ClientSoc.getRemoteSocketAddress());
                   start();               
              catch(Exception ex)
    //encrypto routine starts
    class DesEncrypter {
            Cipher ecipher;
            Cipher dcipher;   
            // 8-byte Salt
            byte[] salt = {
                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
                (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03 };   
            // Iteration count
            int iterationCount = 19;   
           DesEncrypter(String passPhrase) {
                try {
                    // Create the key
                    KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                    SecretKey key = SecretKeyFactory.getInstance(
                        "PBEWithMD5AndDES").generateSecret(keySpec);
                    ecipher = Cipher.getInstance(key.getAlgorithm());
                    dcipher = Cipher.getInstance(key.getAlgorithm());   
                    // Prepare the parameter to the ciphers
                    AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);   
                    // Create the ciphers
                    ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                    dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
                } catch (java.security.InvalidAlgorithmParameterException e) {
                } catch (java.security.spec.InvalidKeySpecException e) {
                } catch (javax.crypto.NoSuchPaddingException e) {
                } catch (java.security.NoSuchAlgorithmException e) {
                } catch (java.security.InvalidKeyException e) {
            // Buffer used to transport the bytes from one stream to another
            byte[] buf = new byte[1024];   
            public void encrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes written to out will be encrypted
                    out = new CipherOutputStream(out, ecipher);   
                    // Read in the cleartext bytes and write to out to encrypt
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
            public void decrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes read from in will be decrypted
                    in = new CipherInputStream(in, dcipher);   
                    // Read in the decrypted bytes and write the cleartext to out
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                        //added later on
                        in.close();                    
                    out.close();
                } catch (java.io.IOException e) {
    }     //encryptor routine ends
    //not implemented right now as we arent using the ftp server to download stuff...can be activated later on if we want
         void SendFile() throws Exception
              String filename=din.readUTF();
              File f=new File(filename);
              if(!f.exists())
                   dout.writeUTF("File Not Found");
                   return;
              else
              {     dout.writeUTF("READY");
                   FileInputStream fin=new FileInputStream(f);
                   int ch;
                   do
                        ch=fin.read();
                        dout.writeUTF(String.valueOf(ch));
                   while(ch!=-1);     
                   fin.close();     
                   dout.writeUTF("File Received Successfully");                                   
         String Compare(String filename) throws Exception
                        ///dout.writeUTF("entering compare");
                        String dateTempString=new String();
                        Date dateValue=new Date();
                        SimpleDateFormat formatter = new SimpleDateFormat ("hhmmss");
                        dateTempString = formatter.format(dateValue);
                        File dir1 = new File("C:\\FTPnew");
                        boolean success2 = dir1.mkdir();
                        if (!success2) {
                             // Directory creation failed /Already Exists
                        File dir = new File("C:\\FTPnew\\server");
                        boolean success = dir.mkdir();
                        if (!success) {
                             // Directory creation failed /Already Exists
                        File ftemp=new File(dir,dateTempString + filename);
                        File fnewtemp=new File(dir,"new-enc-"+filename);
                        // Create encrypter/decrypter class
                        DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
                        FileOutputStream fout=new FileOutputStream(fnewtemp);     
                        int ch;
                        String temp;
                        do
                        {     temp=din.readUTF();
                             ch=Integer.parseInt(temp);
                             if(ch!=-1)
                                  fout.write(ch);                         
                        }while(ch!=-1);
                        fout.close();
                        //dout.writeUTF("written temp en file");
                        // Decrypt
                    encrypter.decrypt(new FileInputStream(fnewtemp),
                    new FileOutputStream(ftemp));
                        //String Option;
                        dout.writeUTF("Delete");                    
                        System.out.println("File Upload Successfull--Duplicate file with timestamp Created");          
                        boolean success1 = fnewtemp.delete();                    
                        return "hello" ;
         void ReceiveFile() throws Exception
              String ip=din.readUTF();
              System.out.println("\tRequest Coming from Internal IP Address : "+ ip);
              String filename=din.readUTF();
              if(filename.compareTo("File not found")==0)
                   return;
              // Destination directory
       File dir11 = new File("C:\\FTPnew");
                        boolean success22 = dir11.mkdir();
                        if (!success22) {
                             // Directory creation failed /Already Exists
                        File dir = new File("C:\\FTPnew\\server");
                        boolean success21 = dir.mkdir();
                        if (!success21) {
                             // Directory creation failed /Already Exists
              File f=new File(dir ,"enc-"+filename);
              File fe=new File(dir,filename);
              String option;
              if(fe.exists())
                   //dout.writeUTF("File Already Exists");
                   String compvalue = Compare(filename);
                   //dout.writeUTF(compvalue);
                   if(compvalue.compareTo("hello")==0)
                        //dout.writeUTF("Transfer Completed");
                        return;
                   option=din.readUTF();
              else
                   //dout.writeUTF("SendFile");
                    option="Y";
                   if(option.compareTo("Y")==0)
                        // Generate a temporary key.       
            // Create encrypter/decrypter class
             DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
                 FileOutputStream fout=new FileOutputStream(f);                    
                        int ch;
                        String temp;
                        do
                        {     temp=din.readUTF();
                             ch=Integer.parseInt(temp);
                             if(ch!=-1)
                                  fout.write(ch);                         
                        }while(ch!=-1);
                        fout.close();                    
                        // Decrypt
                    encrypter.decrypt(new FileInputStream(f),
                    new FileOutputStream(fe));          
                        boolean success2 = f.delete();
                        dout.writeUTF("Delete");
                        System.out.println("File Upload Successfull");                    
                   else
                        return;
         public void run()
              while(true)
                   try
                   String Command=din.readUTF();
                   if(Command.compareTo("SEND")==0)
                        System.out.println("\tSEND Command Received ...");     
                        ReceiveFile();
                        continue;
                   catch(Exception ex)
                        //System.out.println("\tClient Terminated Abnormally ...........");
                        continue;

    Please note that this is not an FTP client and server. FTP is defined by a standard IETF protocol and this isn't it.
    Then, move the following lines:
    din=new DataInputStream(ClientSoc.getInputStream());
    dout=new DataOutputStream(ClientSoc.getOutputStream());
    System.out.println("FTP Client Connected ...");
    System.out.println("External IP of Client ..." + ClientSoc.getInetAddress());
    //System.out.println("FTP Client Connected ..."+ClientSoc.getRemoteSocketAddress());from the constructor into the run() method. i.e. don't do anything with the socket in the thread which handles the accept().

  • FTP client is not working in active mode

    Hi,
    I have a ftp issue trying to download iweb files.
    My provider enabled me a ftp access.
    I tried to connect to it with transmit or rbrowser ftp client (passive mode disabled). The connection works well but i can not retrieve the list of files.
    However using my PC and filezilla ftp client in active mode, the connection did work properly.
    Any idea to help make this connection work on my mac ?
    Thanks

    Perhaps this will help...
    http://slacksite.com/other/ftp.html
    "The main problem with active mode FTP actually falls on the client side. The FTP client doesn't make the actual connection to the data port of the server--it simply tells the server what port it is listening on and the server connects back to the specified port on the client. From the client side firewall this appears to be an outside system initiating a connection to an internal client--something that is usually blocked."

  • How can FTP users access my NAS system via FTP client?

    I recently purchased a 2 bay, 4TB Buffalo Link Station DUO in order to solve some FTP issues.  I have about 50 users outside my LAN that need to connect drop files on my NAS, however nobody seems able to connect via FTP client.  If they login using the Web Access Dynamic DNS address they can read and write via their web browser, but it's clunky and slow.
    My NAS system has been given the IP adress of 192.168.1.254 which seem to me that it's a local IP adress, not a public/static IP. Do I need to manually assign an IP adress to my NAS system in order fot users to log into that specific IP and go directly to the shared folders on the NAS system?
    Thanks in advance!

    Your NAS is getting that IP because it is behind your Router, which is the normal way to use it and as it should be.
    You can not ASSIGN a public IP you your NAS. Only your ISP can do that and usually that incures an extra cost for more than 1 Public IP address. Usually included with a Business account and most of the time only available with a Business account. ISP do not want home owners running FTP or Mail servers on a residential acounts.
    As noted you have to forward the noraml FTP port, port 21, in your Router to the IP of the NAS. Since you already have that port forwarded to your Mac, which I have no idea why you did that, you have to either change that port forwarding to the NAS IP or make the FTP server on the NAS respond to some other port and forward that on the router to the IP of the NAS. The to access the NAS FTP server you have to enter the piblic IP address of your router followed with a :and port #. XXX.XXX.XXX.XXX:22 or whatever port # you assign to the FTP server on the NAS.

  • Looking for a specific feature in an FTP Client

    Hello!
    I am looking for a "simple" feature in any FTP client for OS X.
    I have tried Fetch, Transmit, CyberDuck and Interarchy 7.x and none had the ability to throttle uploads/downloads. I work with a limited bandwidth and sometimes have to download files (or upload) in the background but at a very slow speed (because the peer has a poor connection).
    None of these nice (and they are nice!) ftp programs can do this. I have to either use wget via the command line (wget --limit-rate=xx) or use Total Commander for Windows inside a Parallels Virtual Machine.
    Does anybody know about a Mac FTP client that can throttle and enqueue items easily?
    Thanks in advance!

    Look at "lftp". It as about a zillion parameters that can be set. One of them is "net:limit-total-rate"
    Quoted from the Docs....
    limit transfer rate of all connections in sum. 0 means unlimited. You can specify two numbers separated by colon to limit download and upload rate separately. Note that sockets have receive buffers on them, this can lead to network link load higher than this rate limit just after transfer beginning. You can try to set net:socket-buffer to relatively small value to avoid this.
    Find lftp here lftp.yar.ru It is also in thr Fink archive. http://fink.sourceforge.net/

  • FTP Clients on E72: can't get any to work

    Hello again.
    So, I've been trying to get FTP Client functionality on my Nokia E72. I guess I'm just doing something wrong, but I cannot figure it out.
    I tried:
    * SIC! FTP (native Symbian App)
    * PaderSyncFTP (Java)
    * MobyExplorer (Java)
    None of the applications work on my E72. They do work however (with the same SIM card) on my Nokia 6120 classic.
    The applications seemingly try to connect on the E72, however it never actually initiates a packet data connection at all. As if there wouldn't be an application trying to access the Internet.. I also tried to set up WLAN as my primary access point. Works for everything else, but not for those FTP clients.
    I tried several FTP servers on different ports (21, 666, 667). All work on 6120 classic, none work on E72. Also tried to switch from passive to active mode to no avail.
    Funny thing is: When I use my PuTTY SSH Client on E72 to just probe an FTP servers port, that works! I can see the connection attempt in my FTP Servers logfile, and I can see the Server responding in PuTTY!! But with the actual FTP clients i never even get out into the network, wether I try to use WLAN or 3.5G..
    I'm lost. Everything else works. SSH2 using PuTTY works, Skype works, webbrowsing works.
    What could be prohibiting all those FTP clients from initiating a connection?! For MobyExplorer I even tried all of its four "connection modes" that they have for "buggy firmwares". Doesn't make a difference at all.
    Also: Those apps never ask for an Access Point on the E72, even if the AP is configured to do so.
    I have no idea what to do...  Any advice would be appreciated! Maybe it's just some strange configuration issue..
    Thanks.

    k-lite is a free codec that makes windows media player 11 work and it has its own player.
    T430u, x301, x200T, x61T, x61, x32, x41T, x40, U160, ThinkPad Tablet 1838-22R, Z500 touch, Yoga Tab 2 Windows 8.1, Yoga Tablet 3 Pro
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    If someone helped you today, pay it forward. Help Someone Else!
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Trying to install InDesign (Adobe) but when I double click the Install it calls up FTP Client Ultimate?? What is the install program for MACBook Pro?

    I'm new to MAC, that said I really haven't had much trouble with it except today I am trying to install Adobe InDesgin but it keeps trying to use FTP Client Ultimate  to do so.. What is the installer that it should be using? I was hoping it would auto start and install but no such luck..

    Thanks, I have posted to Adobe regarding their program, but my question here ( I'm new to Mac world) is what install program would normally install this? For some reason my MacBook pro keeps calling on FTP Client Ultimate to do the install and clearly that's not the right program to install a program..
    I Love mu Mac, but getting help is a it frustrating...
    i'm sure Apple has a program similar to InDesign, but have no idea what it would be..

  • Uploading iWeb site to personal domain via FTP client (NOT .MAC)

    Hello,
    I want to upload my iweb created website to my personal domain, in other words I do not want my domain to point to my .mac address.
    I am downloading Cyberduck as my FTP client. Will I just send my whole "site" folder to my public folder at my personal domain? Will it be in the right order? How will I update each day? (Can I set up iWeb so that when I click "publish" it will update my personal domain?)
    I was planning on using some wordpress plugins to modify my site. Will this work? I am totally lost, I had no idea I needed so much background info to blog outside of .mac! I guess I just want to design with iweb, and be able to use all the tools of my AN Hosting and wordpress.
    Thanks for your help in advance!

    Will I just send my whole "site" folder to my public folder at my personal domain?
    You send the folder created by iWeb which has the same name as you gave your site inside the iWeb app, plus the index.html file which iWeb created alongside that folder.
    How will I update each day?
    By publishing again to a folder and uploading again via ftp.
    (Can I set up iWeb so that when I click "publish" it will update my personal domain?)
    No. If iWeb could do that you would not need an ftp program to start with.
    I was planning on using some wordpress plugins to modify my site.
    No idea, but generally speaking modifying iWeb to add stuff requires manual editing of the html after publishing and redoing it every time you republish.

Maybe you are looking for

  • Linksys E1200 No Longer Working After Verizon Modem Replacement

    I have a new Linksys E2100 that was working well with an old Verizon modem. Then recently that modem gave up the ghost and I was issued another one (Westel Model 6100G). I have no problems with internet connectivity when connecting directly from my h

  • Reimporting WebService from Service Registry into WD Model (DC type = WD)

    Hello We're facing a strange behaviour when trying to reimport a webservice from our service registry. We renamed some attributes in our application service / business object (within CAF), generated, built and redeployed everything and then did the r

  • How to run a jms-class as a stand-alone java-Programm???

    Hi, I have another little question concerning jms. The jms programs I have written so far had to be executed as application clients using the appclient-tool. I asked myself, if it is possible to run a class that uses jms like a normal java-Programm w

  • Video effects not working on nested sequences in Premiere Pro CS5

    Hi - I am having some trouble with Premiere ProCS5. I have a project with a few clips which I put together in one sequence. I put this sequence into another sequence. There I will add one or two tracks of additional images and apply color correction.

  • Backups from internal drive to external drive

    How do I transfer my backups from my internal hard drive to my external hard drive?  My internal hd is 500GB and with backups, it takes up 274GB.  My external is a 2TB hard drive with plenty of room to spare.  Any help is highly appreciated.  Thanks!