Smile at him, then say hello, then pass the time of day, little comments as you would to, say, a shopkeeper eg 'Lovely day!' or whatever. Do those in increments if it helps you to build up the courage. If you want to get straight to the point, ask him about the office building and now the doorway; is that where he was staying, how is it in the doorway etc. Apparently, one of the most isolating things is being invisible, people avoiding eye contact; so looking at him and engaging with him goes a long way.
He is actually quite vulnerable in that doorway - there are some members of the population who think it is a sport to kick people sleeping in doorways (and those are the milder things he's vulnerable to). The relevant authorities will know about him but they can't force him to engage with them re rehabilitation, housing; but he may be accessing support services somewhere along the line. If the temperature gets to zero or below, there are designated centres that open their doors so that rough sleepers are inside for the night. At Christmas there are centres (in cities) that open 24/7 for a week-ish, where guests are fed and entertained with a warm, safe-ish place to sleep. You could talk to him about that - is he going to attend a christmas project, what is he planning to do at Christmas, where does he get his food. Get to know him. He may be reluctant or he may gush, you never know.
I wouldnt give him money outright, I would be more inclined to give him drinks etc - you could ask him if he wants a tea/coffee and how he likes it, for instance - then that gives an opening to chat, if that's what you want. He will have more than enough food if you are in a city and he attends the relevant centres at mealtimes. Just chat to him, you don't need to be afraid to broach subjects - tbh he'll be used to people getting straight to the point. Listen to what he says, don't try to sort him out (unless he asks) but, if you like, offer suggestions as you would to a friend; be natural. Get your boundaries ready to say 'no' if he asks for something you are not prepared to give.
You may not get to that (above) but a smile, a wave, a greeting goes a long way. I do a lot of work with the homeless as a volunteer and it helps to be in a setting that is amenable to contact iyswim. It also breaks down the fear of how to relate.