I connect to Host1 using ssh and start a screen session. From one of those windows I ssh into the Host2, which launches a screen session on login.

How can I create new/switch between screen windows on Host2? Is there a way to escape the first screen(Host1) and send the command to the second screen(Host2)


What you have is a nested screen session (using screen within a screen session).

By default, to send commands to the nested session, you hit a second a first:

Ctrl + a a command

For example, to create a new window in the nested session:

Ctrl + a a c

From the screen documentation:

(C-a a) Send the command character (C-a) to the process in the current window.

  • So 'nested screen session' is the magic google word for this, thanks. – Stapper Jul 24 '15 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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