Just call a local US embassy and ask how to do that.
how can someone from a different country can apply social security number without the need of leaving the country and without work in the US?
Google it
I need the full explanation of the whole process with all the details and what documents will be necessary