Viruses are NOT POSSIBLE on any modern smartphone currently in production.
The worst you can get is a Trojan. And this requires you to download the app, install the app and then run the app.
Yes, iPhones can have viruses, are you going to get one? Not likely. I think in the history of the iPhone there have been maybe 3 or 4 actual harmful apps and usually, like Skull One pointed out, they don't spread. Security Expert Charlie Miller just demonstrated yesterday how non-jailbroken phones can be attacked by an app from the app store with hidden code that would allow Charlie to steal address book, messages, phone log etc, as well as sending remote commands to the infected device(vibrate, ring, etc).
If you're jailbroken and you have OpenSSH installed, just be sure to change your SSH password and you should be fine. No, there are no virus scanning apps for the iPhone.