Scientists using the Hubble Space Telescope have confirmed that the Jupiter-orbiting moon Ganymede has an ocean beneath its icy surface, raising the prospects for life, NASA said on Thursday.