I believe the origin of the word mosh is from 70s England by way of Jamaica. Many 70s skinheads in the UK were huge fans of Jamaican music, especially ska. There were a number of ska songs that included the exhortation to "Mash it up!" which was pronounced more like "Mosh eet oap!" in Jamaican patois. The term referred to dancing, not neccesarily slam dancing, but the English kids adopted the term as their own to define their unique style of pseudo-violent dancing. The word filtered down through UK punk fans, to US punk fans, to pretty much any global form of testerone-influenced music today. The mosh pit, of course, is the ever fluctuating area in front of the stage where the moshing is going on.