I run Xubuntu in a VirtualBox VM on my Windows PC. Last night I saved the VM before shutting down the PC.
This morning, after restarting the VM, I find three ssh sessions from yesterday. For example this one:
Code:
$ ps -ftpts/2
UID PID PPID C STIME TTY TIME CMD
bbausch 5003 5002 0 10月06 pts/2 00:00:01 -bash
bbausch 27965 5003 0 10月09 pts/2 00:00:06 vi what-i-learned
bash's parent, sshd, is sitting there waiting for the ssh client to talk to it, but the client doesn't exist anymore. This particular session has been up for almost a week, it seems:
Code:
$ who
bbausch pts/2 2019-10-04 10:42 (10.0.2.2)
...
I have no real problem killing that Bash process, but
I wonder if there is a way to reconnect to such an orphaned session in order to recover whatever can be recovered.
Yes I know about tools like screen and tmux. Unfortunately they only help if you use them
before the connection is severed.