Keep remote session using screen



$ ssh remote
$ screen
  ... do stuff ...
  get disconnected

$ ssh remote
$ screen -dr
  ... back where you were ...