"We’ll be at Hogwarts in ten minutes," said Professor Lupin. "Are you alright, Harry?"
Harry didn’t ask how Professor Lupin knew his name.
-The first time Lupin addresses Harry by his name
Rereading the books, this interaction breaks my heart. Because the first time you read it, you assume Lupin knows who he is because he’s Harry, and that he recognises his scar or he’s seen Harry’s picture in the papers, maybe. But once you’ve read the books, you know that it’s because Lupin’s seen that face before. Harry looks only a little older than James did when Lupin first met him - he probably still has photographs of the Marauders at that age. Harry looks about the age that James did when he found out that Lupin was a werewolf - a terrible, dangerous, Dark creature - and told Lupin that he didn’t care. He looks exactly like James did when he was a teenager - except with Lily’s eyes.
Lupin recognises Harry because it’s the face of his best friends’ son. He probably held Harry as a baby, not long after he’d been born, with James and Lily smiling happily over him. He probably watched Harry toddle around their house in Godric’s Hollow when he was first learning to walk.
And it reminds Lupin of everything he lost that night when James and Lily died, and Sirius went on the run.
That’s how he knows Harry’s name.