“For us, the terminal is a default shelter,” said Phil Mellor, 55, who said he had largely relied on Grand Central for shelter since he lost his job as a security guard several years ago and his life began spiraling downward. Now, he said, he survives on “what the tourists throw out” and spends nights sleeping on the No. 6 train when the terminal is closed. The station’s dining concourse, on the lower level, with its popular food kiosks and ample seating, attracts diners as well as several dozen homeless people.

At Penn Station, the busiest public transportation center in North America, serving more than 600,000 passengers a day, some homeless people panhandle from Amtrak customers waiting for high-speed trains to Washington and Boston. Others sell “loosies,” individual cigarettes, to one another outside an entrance on Seventh Avenue. And others try to nap on benches alongside waiting passengers. At the Port Authority Bus Terminal, homeless people fan out, seeking corners and little-used corridors to sleep without being rousted by police officers.

This ad hoc shelter system has endured for decades with homeless people staying months or even years. Against the waves of purposeful travelers and suburban commuters, they sprawl on floors of cold tile, lit by the glare of fluorescent lights, with a constant soundtrack of final-call departures. They tote all they own in inelegant bags and pass the hours in cavernous passages between track gates or bus bays. Many seem to be grappling with mental health issues.

Their presence in some of the country’s busiest transit hubs recalls a far grittier time in the city when violent crime was rampant and transportation stations were crowded with many more homeless people.

Like many who live on the streets, the people in these hubs are what advocates describe as chronically resistant to offers of services, especially beds in shelters, which many homeless people say have too many rules and are rife with danger. Indeed, the city’s shelter system has been rocked by several episodes of violence recently, including the murders of six residents this year.