Is this sentence correct?
To use the computer, it need to be powered.
You are right: it is technically incorrect. Who is using the computer? The sentence doesn't say. A better wording would be, "To be used, the computer needs to be powered." Or, "To use the computer, you must supply it with power."
That said, frankly English speakers use dangling participles all the time and no one notices. I'd be careful in a paper for an English class, but for common speech it's not a big deal.