A strong earthquake under the ocean off Indonesia 's Sumatra and Nias islands has caused some panic but no damage or injuries .