I dont think you need to focus so much on WHAT to say, but just the fact that you are talking to them.
According to Open Democracy, a lot of homeless people are lonely,
77% of homeless people often or sometimes feel lonely, according to a survey undertaken by Crisis in 2015. That’s more than three times the level of loneliness amongst the middle-aged ...
I've worked with homeless people weekly for couple months per year over 2-3 years at a winter shelter (Toronto,
Canada). You are already doing far, far more than most people (eye contact, shake hands, have a conversation).
From a respected mentor, here are the things that homeless people appreciate:
Most people walk by and try to avoid them. ...
The answer is actually quite obvious:
If you start the conversation (after the hello/how are you?/fine you?/ok ok ...) with a genuine interest in how they feel, you'll achieve exactly what you are asking for here. Asking how they would feel about you talking happily about your work shows them 2 things:
1) That you are willing to give them ...
I would like to add a few thoughts to the excellent answers already given. I used to visit a homeless shelter once a week for a period of about 5 years, and it never ceased to make me feel humbled and thankful. Kindness shown towards others, especially those less fortunate, not only brightens their lives, but also changes YOU in the best possible ways.