Social Security is an earned benefit. To collect a monthly retirement benefit, a worker must pay into the system for at least 10 years (they need not be consecutive years). Tough rules in place assure that only workers who have met the 10-year qualification can collect retirement benefits.
The only people who can legally collect benefits without paying into Social Security are family members of workers who have done so. Nonworking spouses, ex-spouses, offspring or parents may be eligible for spousal, survivor or children's benefits based on the qualifying worker’s earnings record.
Keep in mind
Noncitizens who live and work in the U.S. legally do pay into Social Security and qualify for benefits under the same terms as citizens. Undocumented people who work may contribute to Social Security via payroll taxes, but they cannot claim benefits.