The origin of the word is obscure. The first recorded use of the word was in the British satirical magazine Punch on 25 September 1918, although an earlier possible reference uses the word push . The OED records a definition of the word as a noun from 1890, meaning "a dandy".
A popular but false etymology states the expression originated from the phrase "Port Out, Starboard Home", which, before air-conditioning, were allegedly the most desirable cabin locations on ships travelling to and from British colonies in the Far East because they were shaded from the sun in both directions. However, extensive searching of shipping company records and tickets from that period has failed to reveal any evidence for explicit "Port Out, Starboard Home" reservations. .
The prevalence of this false etymology is somewhat encouraged by a song in the musical version of Chitty Chitty Bang Bang. The song P.O.S.H. includes the lyrics:
"Whenever I'm bored I travel abroad but ever so properly,
"Port out, starboard home, posh with a capital P-O-S-H, posh."