You are not logged in.

#1 2015-02-10 09:48:37

kaqqao
Member
Registered: 2013-10-12
Posts: 79

Can I use byobu to share the SSH session between panes (screen splits)

I know my question will sound dumb, so please bare with me for just a sec...

I spend a lot of time SSHing to remote servers and will often need to execute commands and follow logs remotely. I would normally open two tabs in lxterminal, ssh in both and that would be it. Now, I've been led to believe I could have a nice setup where my tabs/splits share the session so I can just split the screen vertically and tail the log on one side while doing my work in another. Please understand I know nothing about multiplexers, so I was looking for the simplest thing. I gave byobu a spin, SSH'd to a server, pressed Ctrl + F2 so split the screen, and I was greeted by a simple dumb terminal that very much did not share the SSH session. At this point I read more on Byobu, but I still don't understand if I'm doing something wrong or it was never meant to behave like a expected.
Can someone please just give a simple, human-language explanation if what I want is doable and is byobu a way to do it? I know I could use X11 forwarding for this, but it first needs to be allowed and configured on the remote server, which is not always the case, and I'd rather stick with a solution that depends on me only, if possible.

Thanks a bunch!

Last edited by kaqqao (2015-02-10 10:26:51)

Offline

#2 2015-02-10 12:04:20

oliver
Administrator
Registered: 2010-11-04
Posts: 2,209

Re: Can I use byobu to share the SSH session between panes (screen splits)

I may be wrong, but I don't think byobu is anything other than a config manager/editor.  It uses screen or tmux on the back-end.   Personally, I prefer tmux but I use both because some of our servers already have screen installed.

I'm going to assume you're using tmux on the back-end just to make it easier

It sounds like you started a tmux session locally, ssh'd to a remote server, split the window and expected the ssh session to be duplicated.  IMO, that will only work if you run tmux on the remote server (i.e. ssh remoteserver --> run tmux.)  If you did do this, the benefit is you could detach the session, shutdown your PC, boot it back up, ssh back to remoteserver and re-attach - all without losing anything.  As long as remoteserver doesn't reboot, your tmux session would remain available

If you run it locally, you could split the window before you ssh and tell it to duplicate your keystrokes (i.e. 'ssh remoteserver' would be sent to both windows and then you could stop the keystroke duplication.  Otherwise, you're splitting a 'local' session so it won't know to ssh remotely - each window within the session is independent.

Offline

#3 2015-02-10 16:55:36

kaqqao
Member
Registered: 2013-10-12
Posts: 79

Re: Can I use byobu to share the SSH session between panes (screen splits)

Thanks a bunch for the answer.
All your assumptions were correct. I do use tmux backend and did duplicate the local session.

Offline

Board footer

Powered by FluxBB