Some context: I've been in the US for almost 5 years under a F1 visa. In the last year I've worked under OPT for a company in the US. I have a SSN but my card says "valid for work only with DHS authorization". I'm a software developer.
I'm planning on permanently moving back to my home country (Ecuador), and keep working with my current employer in the US. They want to hire me as a subcontractor, but I'd prefer to stay under they payroll if possible.
I've heard of people working remotely for a US company without needing a work visa, work permit, but only using an ITIN. They pay taxes in the US although they are not citizens, or residents in the US.
Could I use my SSN, or apply for an ITIN to do something similar?