So I'm new to screen and I've been using this .screenrc for now - https://gitlab.com/joaopizani/env.screenrc-ftw.
I'm trying to make a script that, given a target host, will do the following:
- Open a screen, ssh to the target host
- Open another screen, ssh to the target host, run htop
- Attach both screens together for a split view
I've been able to do the first 2 by using
ssh-copy-id, followed by (assuming
HOST is a given argument):
ssh -dmS "terminal_HOST" ssh HOST
ssh -dmS "htop_HOST" ssh -t HOST htop
I'm not able to attach the htop to the terminal (I don't mind doing the split with my predefined key-combo...)
Is this even possible?