Rediscovering their offloading game, Michael Bradley's men could and probably should have scored more than just WP Nel's try but were well-worth their win thanks to fly-half Hunter who finished with 18 points on the night.
After a scrappy opening it was Matthew Morgan who gave the Ospreys the lead when he slotted a penalty 16 minutes into the game.
Former Cardiff Blues scrum-half Richie Rees had been forced into touch and was then penalised for slowing down the game - Morgan making no mistake from the resulting kick.
However the home side drew level six minutes later after some concerted Edinburgh pressure resulted in Owen Williams being penalised for hands in the ruck. Fly-half Hunter took the easiest of chances to square things up from in front of the posts.
Just before the half hour the Ospreys moved back in front with another Morgan penalty. Having failed to come away with any points after 27 phases of possession, they showed a more clinical side two minutes later when Dougie Fife failed to release George Stowers.
But with just seven minutes remaining in the first half Edinburgh produced a stunning attack to send Nel over for his second try in Edinburgh colours.
After a series of attacks Hunter sent Fife down the right and some great interpassing between the two and Rees allowed Nel to dive over.
Having taken the lead for the first time Edinburgh needed to consolidate but instead they allowed the Ospreys to score a try of their own before the break.
The visitors attacked with verve and after several phases of desperate defence it was Morgan who latched on to Andrew Bishop's offload to sneak over for the try.
Edinburgh got a quick start in the second half and after gaining the ascendancy in the scrum Williams was sent to the sin bin for repeated failure to bind.
His replacement Nicky Thomas fared no better and from the next scrum Edinburgh earned a penalty which Hunter slotted to reduce the deficit to 13-11.
However the home side were dealt a blow after 50 minutes when Ross Ford was forced off with an injury to be replaced by Alun Walker.
It made no difference to the Edinburgh scrum though as they earned another penalty, Hunter's successful effort putting the home side back in front.
The young fly-half was at it again just before the hour when he knocked over another penalty as the Ospreys were caught offside.
The momentum was with the home side and they could have extended their lead further but Hunter's delicate chip wouldn't sit up for Tom Brown on the left wing.
Despite failing to finish that chance they did add another penalty, Eli Walker failing to release in the tackle.
Completely against the run of play the Ospreys could have levelled things when Morgan charged down Hunter's clearing kick but with no defenders left to beat he couldn't collect the ball and Edinburgh got back to keep the visitors out.
It went from bad to worse for the Ospreys two minutes later when Sam Lewis became the second player to be sent to the sin bin for slowing down the ball at a ruck.
And to add insult to injury Hunter slotted a penalty with the last kick of the game to deny the Ospreys a losing bonus point after yet another scrum infringement.
|Edinburgh Rugby Score Card|
|Ospreys Score Card|