Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I control a screen session inside a screen session?

my local machine's terminal
    screen session 12345
        ssh me@remotemachine (I want to be here)
            screen session 67890 (I'm here)

I've got myself in the predicament where I cannot get to the ssh session to disconnect it.

If I press ctrl-a ctrl-d in screen session 67890 it detaches me from session 12345. So how do I get to the 3rd level ssh session so I can disconnect it?

Any kill based solution you offer must not harm the processes running in screen session 67890.

like image 881
user1552512 Avatar asked Nov 07 '12 22:11

user1552512


1 Answers

ctrl-a a is the equivalent of sending ctrl-a to the child screen, so ctrl-a a d should disconnect from the first nested session. If you have them nested deeper, ctrl-a a a d will disconnect the second nested session, and keep adding additional as as needed. If you're nesting deeper than 1 or 2 levels, though, don't ask for sympathy when your head explodes from trying to keep straight which session you're sending commands to...

like image 119
twalberg Avatar answered Sep 22 '22 06:09

twalberg