2

my question is how to best manage two layers of "screen" sessions:

In my institute we have a compute cluster for numerical simulation. To login on that cluster one has to go via a load balancer who distributes the users to 4 control nodes (from where they then can start jobs on the actual cluster and do post-processing) because the login process is a little complex (3 passwords ad a user interaction) I would like to keep one session open, which I can also resume from home. This implies running screen on my workstation. On the other hand I would like to have multiple screens on the control node using only one ssh connection, so I have to run screen also on the node. But if I do that I can only control the first screen (by "crtl+a" and "space" for example). What would be the best solution to this using only one ssh connection? Thanks for your help!

Philipp

2
  • Well, you can use ctrl+a+a to send a ctrl+a through the first screen to the second, but hopefully someone would have a better solution for you Jan 13, 2016 at 17:19
  • thanks for the tip Eric! this is a quick and easy trick.
    – pmgast
    Jan 16, 2016 at 17:03

2 Answers 2

1

On your workstation, you can change the escape character to something other than ctrl+a, maybe ctrl-b. To do this, add this line to your .screenrc file:

escape ^Bb

This way you can reconnect to the screen session on your workstation and use ctrl-a as the escape character to send command to the screen session running on your control node while using ctrl-b for the session on your workstation.

0

You asked two questions:

  • multiple screens

In addition to changing the escape character as mentioned by others, you could look at tmux, which is very much like screen, only better. Biggest bonus is that you can have multiple clients connected simultaneously, so you can leave the one on your workstation up while you connect from home too.

  • only one ssh connection

given that you want both control from your workstation and have to log in to the cluster, I don't see how that is possible.

3
  • thanks for the tip with tmux. If it is easy to compile I will try that.
    – pmgast
    Jan 16, 2016 at 17:07
  • You can leave a screen session open and connect to it from multiple locations too Jan 17, 2016 at 1:32
  • @EricRenouf - true, but I believe that tmux is easier in this regard. YMMV. Jan 19, 2016 at 23:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .