[sf-lug] switching from ssh server to terminal: can it be done and if so, how?

Rick Moen rick at linuxmafia.com
Mon Feb 11 19:22:26 PST 2008

I wrote, earlier:

> For reasons that I'll make clear, you can just make a habit of typing
> "screen -dr".

...except for when you initially start up the session.  Just "screen"
starts it.

My own "screen" session tends to run on my server for months or in some
cases even a year or more, so I tend to forget for long periods at a
stretch what it's like to launch it.  ;->  (In fact, one way I know
there's been an overnight power outage is that unexpectedly I find upon
login that I have no screen session running as expected.)

As I said, this solution rather vastly exceeds the needs of Alex's problem
as stated, but certainly he can be running ssh from work to his
"screen" session all day long, close PuTTY, go home, ssh back into his
server, do "screen -dr" to reattach and see his mutt/vim/whatever
sessions exactly the way he left them, and so on.

To address Alex's actual, literal question:

> Here's the question: can I switch that job to a terminal so that I can
> complete the message and send it off?

Unless it's already running under "screen", I can't think of a way,

Oh, I'm sure it could be done in theory.  The mutt and vim processes
have their stdin, stdout, and stderr I/O streams routed in a particular
way that connects them to Alex's PuTTY network connection, and in theory
those could be grabbed and redirected to somewhere else.  This tends to
be what long-time Unix types somewhat acidly refer to as a "simple matter 
of programming" (SMoP).  I.e., ease of doing it is probably proportional
to the distance from the actual coding task.

(I would be delighted to be proved wrong.)

More information about the sf-lug mailing list