No, you can't recover a shell after a disconnection. Instead what you can do is ensure the command you were running continues to run after the disconnect.
To achieve this, use "nohup" and "disown" commands, which are usually builtin commands on most shells, i.e. you don't need to install anything. This only works for non-interactive commands though.
So, the steps would be as follows:
- Login to server
- Run your command: "nohup sudo yum update &" (this will also log all output to nohup.out file in your current directory)
- Run "disown %1"
- Feel free to disconnect at this point or wait to be disconnected :)
When you come back to the server, simply "tail nohup.out" to see how the command is doing.