No, but there is a kernel of truth to that common myth. A variety of flavor and aroma compounds are in foods, including esters, aldehydes, and pyridines (these last are the ones associated with the characteristic peanut odor). None of these flavor compounds, however, are proteins, and proteins are the components of foods that cause allergic reactions. Researchers have isolated the proteins that trigger allergic reactions in those with peanut allergy, and they are entirely distinct from the flavor compounds. So simply smelling peanuts shouldn't cause a reaction in someone with a peanut allergy. (This has been confirmed experimentally by researchers who exposed peanut allergic subjects with peanut butter and a soy butter placebo for 10 minutes at one-foot range. None of the subjects reacted.)
However, a few related phenomena can cause reactions. First, inhalation of peanut dust and small particles of peanuts can cause reactions in those with peanut allergy. So in situations where shelled peanuts can spread dust in the air, that small exposure may be enough to cause a severe reaction. Second, when foods are cooked, they often release oils into the air -- oils that can contain allergenic proteins and cause reactions. Finally, trace amounts of peanut products can get onto hands and be ingested by someone with an allergy, causing a reaction.
Source:
Simonte, S.J., et al. "Relevance of Casual Contact with Peanut Butter in Children with Peanut Allergy." Journal of Allergy and Clinical Immunology. Jul. 2003. 112(1): 180-82.
