How to SSH Into Your iPhone Using WinSCP (Windows)
These are instructions on how to transfer files to your iPhone using WinSCP. To follow this tutorial you need to have a jailbroken iPhone with SSH installed. You can find instructions on how to jailbreak your iPhone here (3G) or here (2G)
Press the Cydia icon on your Springboard
Press to select the Sections tab at the bottom of the screen.
Press to select Networking from the list of Sections.
Press to select OpenSSH from the list of Packages.
Press the Install button at the top right of the screen.
Press the Confirm button at the top right of the screen.
Once installation has completed successfully press the large Return to Cydia button.
Hit the home button on your iPhone to return to the Springboard.
We must now obtain the IP Address of the iPhone. To do this press the Settings button on your Springboard.
Press to select Wi-Fi from the Settings Menu
Make sure you are connected to a wireless network then press the circular blue arrow button.
Take note of your IP address from the Wi-Fi details screen
Make sure you are on the same wireless network as your iPhone and launch WinSCP by clicking it on your desktop, or in the start menu. You can download WinSCP from here.
Once WinSCP opens, enter your iPhone's IP Address into the Host Name Field. Then enter root as your iPhone username and and alpine as the password. Then click Login.
You will now see WinSCP connecting to your iPhone. The first time you login using SSH, it may take 30-45 seconds.
If a Warning dialogue pops up, click Update or Add
After about 30-45 seconds, WinSCP should successfully log you into your iPhone. You will be placed in the /private/var/root directory.
To get to the root folder of the iPhone you can select /
To transfer a file to the iPhone simply locate your local (on your computer) file using the left pane. Then navigate to the desired location in the right pane. Drag the file from the left pane to the right pane to copy the file to your iPhone.
As user dlr stated, it is a good idea to set auto-lock to never. You can do this by going to Settings>>>General>>>Auto-Lock and set to never.