When I connect to remote servers over SSH, I usually start a screen (another alternative is tmux) session and then perform my administrative and diagnostics actions in that session. This way, even if I get disconnected, I can reconnect and join that running session. There are other benefits to a screen multiplexer - such as multiple remote users being able to attach to the same session, a joy when a distributed team needs to diagnose an issue or watch some actions together.