4
  1. login to Server1 and run screen
  2. SSH to Server2 and connect to an existing screen session
  3. Realise ^A commands are procesed by Server1's screen only

Is it possible to control Server2's screen in this situation? Even if only to detatch from it.

The only thing I could see to do was tell Server1's screen to kill its window containing the SSH session.

1 Answer 1

6

Yes, it is possible. One of the commands you can send Screen with its metacharacter (^A) is a literal ^A, which is done with the ^A-a (ctrl-A, lowercase a) sequence. On the help screen (^A-?), you will see one key defined as meta.

So, in short, to send a command to a screen within a screen (e. g. to disconnect the nested screen), you would press ^A-a-d, which would send ^A-d to the nested screen, detaching it and leaving the first-layer screen connected.

0

You must log in to answer this question.