Ghosts and demons are quite different entities. While ghosts are considered to be malicious at times, often they mean no harm.
From the Dead Sea Scrolls found by accident after WWII: