“The Ghost in the Machine” is episode five of season five of Stargate: Atlantis.
Whilst Rodney, Sheppard, Teyla and Ronon are returning in a Puddlejumper to Atlantis, the jumper’s systems start behaving erratically before shutting down. They manage to return, but then Atlantis’s systems started behaving the same way.
Then whatever is in the systems starts to communicate with them – and states that it is Elizabeth Weir.
After the human-form Replicators’ home world was destroyed in “Be All My Sins Remember’d”, another Elizabeth Weir is seen in a ship. This Weir claims that she is the original Weir’s consciousness in a Replicator body. She says that she, and the other Replicators like her, are stuck in subspace after having failed in their attempt to achieve Ascension.
Sort of oddly, this Elizabeth Weir is played by a different person. There is a good explanation given, but it does make you wonder if the explanation was because they couldn’t get the original actress.