A remote login changes the machine and often the user and working directory. Confirm that context before editing files.
A valid connection to an archive host doesn't mean you reached staging. The shell prompt is useful evidence, and pwd verifies the directory after login. These connections are local simulations with named host profiles; they never open a network session or request credentials. Treat the destination as part of the task result rather than an incidental step.
In deployer@staging, the part before @ selects the login user and the part after it selects the host. Verify both in the prompt after connecting. A remote command such as ssh deployer@staging pwd prints that host's directory and returns to the calling context, while an interactive connection leaves you working in the selected host profile.