Automatically (or more easily) reconnect to a screen session after network interruption

后端 未结 6 1108
旧巷少年郎
旧巷少年郎 2021-01-30 00:20

ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen completely transparently and automatically

See also this related question:
https://s

6条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 00:45

    Does the -t option do what you want?

         -t      Force pseudo-tty allocation.  This can be used to execute arbi-
                 trary screen-based programs on a remote machine, which can be
                 very useful, e.g. when implementing menu services.  Multiple -t
                 options force tty allocation, even if ssh has no local tty.
    

    So:

    laptop> ssh -t server.com screen -dr pts-2
    

    This seems to work in my installation.

提交回复
热议问题