Over a period of two years Alan Ford, 69, flashed the victims, who cannot be named for legal reasons.
He was originally charged with exposure but the Crown Prosecution Service agreed that there was no sexual intent behind his actions.
Ford admitted six counts of outraging public decency.
All of the offences were committed in Gosport.
The earliest dates back to between June 1 and February 23 in 2014, with others in November 25 in 2015, and on January 27 this year, February 13, July 20 and September 10.
Sentencing, chairman of the magistrates’ bench John Ralphs said: ‘We’ve taken into account your guilty pleas and the fact that up until now you’ve had no previous convictions.
‘We’ve given you credit for those things.
‘We have to balance that of course with the period of time that these activities went on, the fact that some of those offences were committed whilst on bail and the effect your behaviour had on the victims.
‘We’re prepared to deal with this by way of community order.
‘We believe it’s serious enough to make a community order, the order will be one of 12 months.’
Mr Ralphs warned Ford not to reoffend.
Ford must complete 20 days of rehabilitation activities.
Time he spent in custody after being arrested was considered the ‘punitive element’ of the sentence, magistrates said.
Ford must pay £200 prosecution costs and a £60 victim surcharge.
Keely Harvey, defending, said Ford is undergoing weekly counselling on the phone, has been to his GP for help and went to the Priory.
She added ‘sexual motivation’ was not part of the offence.
The court heard he had become depressed and that led to the offences.
Ford, who was facing the possibility of jail, has no previous convictions.
Details of the case facts were not given yesterday.