BOSTON — Boston Mayor Martin Walsh says more than 20 colleges and universities in the city have for the most part agreed to disclose the addresses of students living off campus, a move he says will combat apartment overcrowding that imperils student welfare.

“Not one college pushed back,” Walsh said after a closed-door meeting Tuesday with representatives of colleges including Boston University, Boston College and Northeastern University. Walsh said he’s not seeking names, just addresses, so the city can identify overcrowded apartments and protect students’ health and safety.

The meeting came after The Boston Globe uncovered instances of students living in apartments infested with rats and bedbugs, with non-working smoke detectors and illegal bedrooms.