York Crown Court heard Ryan Hunt, 25, from Ripon, hit the 57-year-old victim over the head with a knuckleduster as he was withdrawing Â£30 from a cash machine outside HSBC at around 6.10pm on 29 April 2016.
Hunt, who wore a balaclava, had parked up outside the bank in a white BMW 3 Series before targeting his victim who suffered minor injuries.
He failed to grab the Â£30 which was sucked back in by the cash machine during the incident.
Hunt then sped off dangerously in the car causing damage to a police van and endangering officers who had arrived quickly on the scene. A bottle was also thrown from the BMW at the police officers.
A police operation was launched to track down the BMW which was found abandoned nearby soon after.
Hunt was arrested by officers near Mother Shipton’s Cave at 7.20pm that day.
Following an extensive investigation by the Harrogate Serious Crime Team, including extensive forensic examinations, Hunt was charged with attempted robbery and dangerous driving. He was jailed for six-and-a-hald-years during a sentencing hearing at York Crown Court. He was also ordered to pay a Â£500 reward to the victim and banned from driving for six years and three months.
Detective Sergeant Dean Robinson, of the Harrogate Serious Crime Team, said: “Ryan Hunt deserves the long prison sentence for his shockingly calculated and violent attempt to commit robbery on an innocent member of the public. I hope the victim can gain some comfort from the outcome.
“I congratulate the investigating officer, DC Andy Bracebridge, along with rest of the team, for bringing this intensive and long-running case to a successful conclusion. I also thank the many witnesses who came forward to greatly assist the investigation."