It depends on how you approach them - I consider myself a somewhat special case:
Two years ago, I did a project on a homeless man named Jeremiah (allegedly) who lived in an old freight depot building in St. Louis. Through him, I met countless other homeless people, city officials, the depot's owners, students, a journalist from the St. Louis Post-Dispatch, etc. Thought it turned out he was a lying, conniving fraud, many of the other homeless people I met remembered me when I came back several months after Jeremiah had been evicted. After spending a few months "settling in" with this other group of homeless, known as Dignity Harbor, I gained their trust (and vice versa) and they allowed me to do another project on them - I am one of only two people they allow in their camp with a camera. This is that project:
http://www.stlbeacon...-dignity-harbor
I continue to visit them on a regular basis, for hours at a time. I talk to them, hang out with them, eat with them - just haven't stayed a night with them yet. But because I know so many homeless people in St. Louis, access to abandoned buildings is never an issue - I either know a resident, or know someone who does. I can explore without feeling threatened as they have openly offered tours of these locations.
That said, I still carry MACE and have my monopod ready to be used as a nightstick if needed. But I've gained an entirely new respect for the homeless which I think will aid me in future encounters. Respect them, and they'll (mostly) respect you.
And as an amusing anecdote, Phil Greer, a long time photo editor for the Chicago Tribune (and my former professor), told me he once was sitting around a burning barrel with a group of homeless men; they told him he couldn't take pictures, and they were pretty tight-lipped. Then one of them got out a bottle and passed it around. When it got to Phil, he drank from it, and passed it on. The "leader" of the men said: "Wait guys. He didn't wipe the top of the bottle off first. He's cool by me," and they opened up and let him get out the camera.
Until you have courage to lose sight of the shore, you'll not know the terror of being forever lost at sea.