Can I move to nyc if I’m homeless ?

I’m at risk for losing my job.. and I’m about an hour and half away from nyc in CT. I wanted to know if the shelter would take me and my child in if I’m not from there ?im also a single mom. I want to go to nyc because I don’t drive and ik it’s easy to get around.