I've set up and sftp connection to another computer on the local network. Is use Cercerus ftp server software on a windows XP system and I log into this remotely using my MAC OS X, with a terminal command window.

Everything works fine, e.g. I can cd, ls, pwd, all the usual simple commands work.
However, when I go into one of my folders called data (which has approx 12,000 files in there) and try to list the contents with ls, the connection fails and 'Recieved message is to long 1783619' is printed to screen.
This problem never manifests itself using ftp, I can list any amount of files I want. Only in sftp do I have this problem!

I've looked around for solutions to this problem. Many said I need to edit my .tcshrc file to remove any print to screen commands that might be in there. There are no commands in there that are obviously effecting it.

Again, the error arrises only when I use 'ls' in the folder containing the large number of files