Peter Dodd was found with the weapon after a fight in Exeter's High Street in which a 17-year-old youth from Exmouth suffered a minor cut to his neck.
Dodd, aged 42, who was living rough in Exeter at the time, but is now of Coronation Avenue, Dawlish, admitted possession of a blade when he appeared at Exeter Crown Court.