I'm using my iPhone 3GS to tether internet connection using SSH via USB (not the normal tethering).

The problem is though that sometimes the SSH tunnel to my iPhone just seem to hang. I think it's because when the iPhone is locked, the 3G connection does not stay alive.

Is there a way to force it to stay connected ? I tried the cydia app "Insomnia" but it seems to work only for the wifi, not 3G.