Keith Newbold was walking to a taxi rank in Newcastle after a summer evening drinking in the city with pals when he was asked for money by strangers as he approached a cashpoint.
When he refused, the 33-year-old was punched and kicked by the homeless gang and suffered six stab wounds to his abdomen, arm and hand.
One of the "life-changing" knife injuries to his abdomen was described as court as him being "gutted".
After the attack, Mr Newbold, who was bleeding heavily, managed to stagger to a nearby takeaway, where he drifted in and out of consciousness, before an ambulance arrived and took him to hospital.
While he was fighting for life, the attackers, who had taken his rucksack and belongings, passed on his bank card to pals, who tried to use it to buy treats from McDonald's.
Mr Newbold said in a victim statement: "There has never been a time before this attack when I felt my life was in danger.
"It terrified me that I had no time to react and get away. I felt trapped.
"I think it is disgraceful myself and other members of the public do not feel safe to walk through our own home city."
Mr Newbold said the pain he suffered was "excruciating", he has permanent scarring and it was unclear what impact the injuries will have on his job as a groundworker.
One of the homeless knifemen, Dean Jones, 26, of no fixed address, has been jailed for 12 and a half years at Newcastle Crown Court after pleading guilty to wounding with intent.
Sean Kelly, 23, of no fixed address, admitted handling Mr Newbold's stolen bank card, and was jailed for 14 months.
Mr Recorder Darren Preston said: "He was lucky to have escaped without even more permanent damage than he has, or even death.
"This was a city centre, where people should feel safe to go about their business."
Prosecutor Angus Taylor said Mr Newbold was in the Haymarket area of the city in the early hours of August 21 last year, near some cashpoint machines.
Mr Taylor said: "He was approached by two beggars, male and female. The male was the defendant Jones.
"Jones asked him for some money and he declined.
"Jones became aggressive and demanded a fight. At that point, three other males appeared. One was Kelly.
"Threatening words were then said between the males and the complainant before the attack took place."
The court heard Mr Newbold was attacked and then stabbed as he curled up in a bid to protect himself.
Mr Taylor said: "He remembers feeling a knife slash to his arm and multiple stabs to his abdomen.
"He described a barrage of punches and kicks to his whole body during what he says was a sustained attack."
Nick Cartmell, defending Jones, told the court: "It was a hot summer's night, a good night for begging.
"These were homeless people, he and his girlfriend were at the cashpoint, there was an argument.
"It was a joint attack. He (Jones) was not the initial stabber. He was not responsible for all the injuries that were inflicted.
"He is now sober and no longer on drugs. He reflects back on this is a night of horror and is truly sorry for the life-changing injuries inflicted on Mr Newbold."
Scott Smith, defending, said Kelly, who was not involved in the stabbing, has stopped taking legal highs and re-established a family relationship.