is it legal to work home (on computer) for a company with a student visa and without authorization?

Does it make a difference if the company is in the US or not?

Thank you.