Article 4S7HD Reconnecting to a disconnected ssh session?

Reconnecting to a disconnected ssh session?

by
berndbausch
from LinuxQuestions.org on (#4S7HD)
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 10ae06 pts/2 00:00:01 -bash
bbausch 27965 5003 0 10ae09 pts/2 00:00:06 vi what-i-learnedbash'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 beforethe connection is severed.latest?d=yIl2AUoC8zA latest?i=Y6AJm6c36Hw:KdwLO96RiZ8:F7zBnMy latest?i=Y6AJm6c36Hw:KdwLO96RiZ8:V_sGLiP latest?d=qj6IDK7rITs latest?i=Y6AJm6c36Hw:KdwLO96RiZ8:gIN9vFwY6AJm6c36Hw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments