For a really long time, we assumed that the JST PH didn't have a free-hanging male header version. But then we found this JST-PH 2-pin Male Cable, and we were like, this is perfect! It's not a genuine JST connector, but it's 100% compatible with a nice clicky connection that you can undo without tearing the contacts from the housing.
Please check wire polarity before using - JST-style wires, sockets and PCB fixings don't always have the same/matching polarity, so you may need to pop the wires out and switch them around.
If you want a switch in the middle, try this switched extension cable. Finally, for PCB and breadboard use, we have the same connector but on a PCB