4

I try to connect to an sftp server (vsftpd) on Centos server through port 22. there is no problem in connection and initial directory listing; there is also no problem if I click on a directory with less than 10 files within.

but for directories with large number of files, probably more than 15 files!!, it shows "Connection Timeout Error, failed to retrieve directory listing" on Filezilla or similar message on other ftp clients.

I tested passive and active modes with no result

Setting vsftpd for passive mode no result .....

I should mention it happens on FileZilla, PSFTP of putty, dreamweaver ftp... but SMART FTP sometimes list the directories with no or less problems.

I use ADSL and a PPPoE connection to an ISP; also as I am in Iran there might be some restriction over some prots or protocols such as SSL in ISPs or ...(usually I cant open https links unless use a proxy software)

I just read a topic

Directory Listing (ls) error ONLY in port 22 (SFTP)

which address my problem as MTU issues

please guide me how can i correct this problem thanks

2
  • Looks like MTU mismatch more than anything.
    – kubanczyk
    Commented Aug 4, 2013 at 16:44
  • I guess so, but what is the solutioun if? I may need some linux instructions to apply on vsftpd
    – Ahmad
    Commented Aug 4, 2013 at 17:17

2 Answers 2

4

I searched much for this problem and did many setting and it took my time for 2 days

I hadn't found any thing about this problem in the internet except the mentioned address and yes the problem in my case was MTU

I changed the MTU size of the server from 1500 to 1460 (1492 didn't work!) the MTU of my PPPoE connection is 1492

by this setting it worked.

For Centos server I used

ifconfig eth1 mtu 1460

note for permanent change you need to modify network config file

this link tells more: http://www.cyberciti.biz/faq/how-can-i-setup-the-mtu-for-my-network-interface/

Also please note you should find an optimal value just before your packets get fragmented

for me it was 1460 this page guides you for that http://www.howtonetworking.com/VPN/mtu4.htm

2

Looks like MTU mismatch more than anything. Small packets get through, but once you request a large chunk of information, the packet gets lost. For pppoe per RFC2516 you should set MTU to 1492 bytes. On changing MTU, see this question.

SFTP does not use SSL internally. But SSL is blocked, I would guess SFTP would be blocked as well... if there is any coherence in your government's policy, that is.

2
  • I don't know! but please note I can connect to sftp and even list small directories, just a bit large directories get stuck
    – Ahmad
    Commented Aug 4, 2013 at 18:38
  • 1
    MTU is a fancy acronym for a max size of a single packet.
    – kubanczyk
    Commented Aug 5, 2013 at 2:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .