The problem is those who Jailbreak, then install OpenSSH so they can apply the cracked app patch, usually just leave the OpenSSH conneciton open all the time (you can use SBSetting to turn it off when not in use)
A sure fire fix is to change your iphone's default password, for example if SSH is running on the iphone, look for the wifi IP address under Settings -> Wifi -> lil blue icon next to active connection.
then in terminal (if you use a mac)
ssh root@ip-address
type the password 'alpine' to get in (same password for every iphone/ipod device
type 'passwd' you'll be prompted to enter the old password then new
type 'exit' to get out of the session
Go back in as mobile via ssh mobile@ip-address and do the same thing.
Once those are changed, the chances of having someone log into your iphone and either getting all your data, or rickrolling you, is much more slim than if you left the default password to alpine.
You can also do the same as above right on the iphone by installing Mobile Terminal from Cydia, and changing the password for mobile first (the default user of the iphone/ipod) then using su or similar to get up into root level and changing the password that way.