According to the official website of the Social Security Administration, illegal immigrants cannot receive Social Security benefits because they cannot get a Social Security card with a unique number. Only legal immigrants can obtain a Social Security card and number.
There are two methods by which non-citizens can obtain Social Security cards, and both require authorization by the Department of Homeland Security and valid immigration documents. Applicants can apply for a Social Security card in their home countries at the same time that they apply for their immigration visas with the U.S. Department of State. Alternatively, applicants can visit a Social Security office after their arrival in the United States and produce documents proving that they are immigrants authorized to work. Either way, they must be legal and not illegal immigrants.