Ribeiro put in the puck after Troy Brouwer deflected a shot from the blue line.
The Capitals lead the series 3-2. Game 6 is Sunday in New York.
The home team has won every game in the series, with Washington taking the first two and New York pulling even in Games 3 and 4. The Capitals have been fighting history along the way: The franchise has lost eight playoff series in which it has held a two-game lead.
He's, believe it or not, actually one of my favorite guys, and I've ended up trading him twice. I appreciate what he's done. He was one year away from being an unrestricted free agent, and I felt with this opportunity, that it was a chance that we were able to get somebody for him in Nick Bonino and Adam Clendening.
— Penguins GM Jim Rutherford on forward Brandon Sutter