I tried to connect to the box on command-line and saw the error:
#Received message too long 1129730848
This was why my windows ssh transfer client was not connecting. This error is because my shell startup file was outputting text to inform human reader! Why is this a problem?
The answer is below:
scp2/sftp and sftp-server use a special file-transfer protocol, which they speak over this SSH session. The protocol is in fact based on the same packet protocol used by SSH.
In order for this to work, the SSH session must be "clean" — that is, it must have on it only information transmitted by the programs at either end. What often happens, though, is that there are statements in either the system or per-user shell startup files on the server (.bashrc, .profile, /etc/csh.cshrc, .login, etc.) which output text messages on login, intended to be read by humans (like fortune, echo "Hi there!", etc.). Such code should only produce output on interactive logins, when there is a tty attached to standard input. If it does not make this test, it will insert these text messages where they don't belong: in this case, polluting the protocol stream between scp2/sftp and sftp-server. The first four bytes of the text gets interpreted as a 32-bit packet length, which will usually be a wildly large number, provoking the error message above.
There was an echo comment in my shell startup file (.bashrc). I comment it out and now i can make sftp connections both command-line and by my windows ssh file transfer client.
sorry koyi, i have partnered you thread but i hope my solution also solves your problem