Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
  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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Perfect, thankyou. –  bromide Oct 17 '14 at 11:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.