A ghost story that scares the crap out of me is the Ivan Vassili, a Russian freighter that sailed at the turn of the century. The sailors reported a presence there. A few people thought they saw something and then every couple of days they suddenly erupted into a wild melee that only ended with a homicide or suicide.
There's a distinct lack of documentation on the Ivan Vassili (like none whatsoever.) It's still a good story. Knowing a ghost story is fiction never keeps it from scaring you. Ghost ships are the worst, whether in sea or space. They have a few factors going for them that set them above the rest.
Isolation: a ship at sea or in deep space is cut off from humanity. The crew is left to their own resources to survive. Some don't and some do. When that becomes less clear cut you have a ghost story. Isolation is harder to achieve these days. Cell phones are often blamed for that but any form of communications is a two edged sword. The more you depend on it the more you're frightened when it cuts out and you go dark.
Danger: the sea and space are hostile environments. There's plenty to kill you there already. You can drown (or asphyxiate), be hit with a storm (Nor'easter or sunspots) or even smack into a rock (fixed or floating). That solar storm isn't going to care what's prowling your corridors and dripping blood at night. The wave of radiation is coming relentlessly. Man your station and don't look behind you!
Chaos: any ship anywhere requires discipline to be maintained and stay under way. A spectral force quickly shoots discipline to hell (sometimes literally). This can cause more mundane but dangerous situations. When the crew refuses to go below deck to stoke the furnaces or balance the exotic matter containment unit you're screwed in ways you can easily grasp and you have to start giving orders and breaking heads; and you still have a fucking spirit looking over your shoulder snickering. The men on the Ivan Vassili going mad and brawling with each other was total chaos and the cause was unknown. In ghost stories this is the perfect storm.
Confusion: at least at first there's an explanation. You're overworked. It's an old ship. That porthole always opens up at 3:13 am. It's probably mice. Don't let it bother you. At its most extreme people begin to to doubt their sanity and that really scary. That ghost ship doesn't register on my sensors. Am I going nuts? For what it's worth the best ghost stories re all subtle. Who keeps moving my stuff? What just breezed past me? Is someone there?
Mystery: what is really going on? Do we have a deranged crew man? Is it aliens (they're easy to blame)? What happened to the crew?
The Unknown: there's no end of psychics out there who will tell you exactly what's going on. The only honest answer you don't know anything for sure. There was no explanation for the presence on the Ivan Vassily, no clue to its motives or goals. Fear of the unknown is the primal fear with good reason. What you don't know can hurt you.
All of this will be just as scary in the far future. As long as we're human we will have ghosts.