A man from Southampton has been jailed for six and a half years for burgling properties with a firearm and a baseball bat in Winchester and Ryde.