The Athens Geodynamic Institute says Friday 's magnitude 5.1 quake was centered near the eastern islands of Kos and Astypaleia , about 300 kilometers from the Greek capital .