sftp stalling issues.

Hello,
I'm new to linux/unix and presently at my work i have wrote a script that goes out from a unix host connects to a transfer proxy using sftp (username & password) with internal IP address as scp is disabled on the server..
Now my problem is that when i try and get a bigger file sftp will stall on downloading the file it appears to get a 64kb chunk and stall on a default buffer connection.

I've tried bigger buffers as in sftp -B 100000 <ipaddress> and it will download a little more but still stall. The crazy thing is if i download a small file it works or if i use winscp (under a sftp/ssh2 protocol) it will download the full file onto a windows box!

I'm really scratching my head over this one can anyone offer help to my particular problem.

Is it version issues... as in ssh vs ssh2... how can it work on windows on a ftp client with ssh2 encryption and not on the unix box?!

try sftp -v to where you get stuck.

if possible setup an sftpd to check if it is a basic problem.

recompile sftp from source