Some ftp websites have a small time out value. When you do some other jobs, ftp connection dies and you should log in again.

How can I keep my connection alive?

Edit: It will be appreciated if somebody provide a method for ftp command as it is light and easy.

  • Why is it important to you to keep the connection alive? The FTP server drops your connection on purpose so it can serve other clients. What's wrong with just logging in again? – dg99 Nov 16 '13 at 17:09
  • On ftp.gigfa.com it gives just 1 min. But you are right, they want to serve other clients. How ever it can be other method to respond users faster and better I think. Anyway I thank the free servers. – Mohammad Etemaddar Nov 17 '13 at 7:24

There is no absolute answer here, as FTP protocol in itself does not include such a mechanism.

There is however, FTP protocol commands with no real meanings on a given situation like "NOOP", "LIST" or "CWD" which can be used to keep the FTP connection alive.

So this is up to the client itself to implement such a mechanism using these "meaningless" commands in order to reset the timeout timers on the server side. Of course, you might also need to tune these client side mechanism in order to match the server side max idle time value.

To give you an example, the well known Filezilla is implementing such a mechanism (see in "Edit" -> "Settings" menu item, then in "Connection" -> "FTP" tab):

Filezilla Settings

Answer to edit: As said, only evolved ftp client would have such functionality. Default ftp client, Windows and Linux alike, are not able to apply such keep alive behavior.

  • Thanks a lot, It was appreciated if I find a method for ftp command. – Mohammad Etemaddar Nov 17 '13 at 7:44
  • What system are you using (to have some clue about its default ftp client) ? – Ouki Nov 17 '13 at 10:24
  • I use ftp.gigfa.com. I connect to it using default ftp command. – Mohammad Etemaddar Nov 18 '13 at 5:32
  • The remote end doesn't matter much. If your system is Windows and the ftp client is the default ftp command: no luck here. Only advanced ftp client would have this feature. – Ouki Nov 18 '13 at 10:11
  • My OS is Linux. – Mohammad Etemaddar Nov 18 '13 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.