A man has admitted beating an 87-year-old pensioner to death with his own walking stick in a random attack at a railway station.