Yes and no. GPS (and other GNSS systems) in principle work in space. LEOs (low earth orbit satellites) even use it for their own positioning. The antennas of the GNSS satellites however are always pointed towards earth. So you still get signals even above the satellite orbit's, but only from the satellites on the other side of earth that are not blocked by earth itself. No idea how useful that is though. I'm not sure if it will still work close to or on the moon but I'd think so (certainly not on its backside) but due to the distance you'd have to accept reduced accuracy. You'll need professional receivers for this though, not consumer hardware like you'll find in smartphones or navis. Earth-based GNSS won't work on or close to Mars, regardless of its relative position to earth. I've read about similar approaches by using different Mars-orbiting satellites for rovers. But the accuracy won't be near anything you'd expect from GNSS as these satellites aren't made for it and there are by far not enough satellites up there for a complete system.
"Hot" as in high temperature? No. It rarely exceeds 273K.