Recruit Legion by rescuing him from the derelict Reaper during your IFF mission. Once you've freed him, reactivate him in the ship's A.I. core. (There's a running joke among fans that placing a geth in the ship's core seems odd, given how much everyone distrusts them.)