A magnitude 6.6 earthquake struck off the northwest of Ternate in Indonesia on Wednesday, the U.S. Geological Survey said.