Before i had a mac i relied heavily on these two programs.
First you need to make sure you have downloaded openSSH from Cydia. After you have done that, the easiest way to SSH is to put your iphone on the same wireless network as your computer, find its IP address, and connect to your phone using winSCP.
The username will be root and the password will be alpine (assuming you haven't changed them). The WiFi signal might shut off on you mid-session, so I make sure to open AIM to keep the signal alive while i SSH.