Sentencing Stephen Gough, judge Sarah Munro QC said: "This is a much more serious offence than the other public order offences. In those circumstances I take the view only a substantial custodial sentence is appropriate."
She said that Gough, who has been on remand, will be eligible for release on August 14 - one day after there is a hearing at Southampton Magistrates' Court to impose a full Asbo on the former Royal Marine.
The judge conceded that, if she had allowed Gough to leave by imposing a sentence commensurate with his time already served: "There is a reality here that he will walk out on these steps naked. I do not think I can ignore that reality.
More top news
Samson the miniature steam train has re-entered service, on the Romney Hythe and Dymchurch railway, Kent's mainline in miniature.
Kenyans Eliud Kipchoge and Vivian Cheruiyot won the men's and women's races respectively, in a scorching hot London Marathon.
The ABP Southampton Marathon is the city's biggest running event, attracting 10,000 runners - and walkers - and thousands of spectators.