I had this problem today and I could not figure out what the problems was. I could connect through my Term vt100 application but I could not connect through WInSCP or Putty. I even tried to use a static ip but nothing.
The weird thing though is that iTunes could see the phone but not WinSCP.
I decided to reset the network settings. but then it would not connect to the internet. Further investigation revealed that it could not get an ip address from the router - it had it's own address but not one that would allow it to connect to the internet. So, I used a static ip and that allowed it to connect to the internet. Now, at this point I could connect with WinSCP but I could not do anything, the connection would break and back to square one.
I decided to go back to DHCP and reboot the router.
Success - problem solved
Rick