8 ms·
[mosh or eternal terminal] + tmux combo solves the problem (and adds other cool functionality) https://mosh.org/ https://mosh.org/ https://eternalterminal.dev
by oandrew 6y ago
[mosh or eternal terminal] + tmux combo solves the problem (and adds other cool functionality)
https://mosh.org/ https://mosh.org/
https://eternalterminal.dev/ https://eternalterminal.dev/
https://github.com/tmux/tmux/wiki https://github.com/tmux/tmux/wiki
- nh2 6y agoIf you require SSH features (e.g. port forwarding) or want to continue using your terminal's native scroll functionality, here's another alternative that a friend and I devised: https://mazzo.li/posts/autoscreen.html https://mazzo.li/posts/autoscreen.html
- hansvs 6y agoThis is great, thanks!
- FunnyLookinHat 6y agoMosh is great - it drastically improved my ability to work remotely over my DSL connection. Adding byobu made it effectively impervious.
- perryizgr8 6y agoI hate mosh because it nukes scrolling. I hate tmux because I just can't remember the keybindings. I've been using mosh+byobu since the keybindings are a bit easier for me. But I'd love regular ssh to be resilient like mosh, or maybe mosh can start supporting scrolling.
- shakna 6y agoI use mosh + screen, because you can tell screen to act like it has normal scrolling with a simple config and then the only keybinding you need to remember is disconnect. defscrollback 500000 scrollback 500000 termcapinfo xterm* ti@:te@ There you go, normal scrolling!
- murkt 6y agoThank you very much, I use screen rarely and the thought that screen can be configured has never crossed my brain.
- shakna 6y agoNot much configuration, and slightly annoying that the config file is at $HOME/.screenrc instead of being patched to use an XDG location, but it's "good enough" for my use cases.
- perryizgr8 6y agoDoesn't seem to work for me. I use mosh to start the session, then screen to create a new screen. But this does not scroll using my mouse. I can scroll using Ctrl+A and then arrow keys. But that's not what I'd call normal scrolling.
- shakna 6y agoThen your version of mosh is breaking on termcapinfo. I can't really help on your particular version, but that's not screen breaking. It has told mosh it supports scrolling with the mouse. Case of "works over here".
- perryizgr8 6y agoThanks for the tip anyway. I'll have a place to start investigating the problem.
- technosmurf 6y agoMosh is designed to only synchronize the last screen of changes and will never support scrolling. https://github.com/mobile-shell/mosh/issues/122#issuecomment-650644732 https://github.com/mobile-shell/mosh/issues/122#issuecomment... http://web.mit.edu/keithw/www/Winstein-Balakrishnan-Mosh.pdf http://web.mit.edu/keithw/www/Winstein-Balakrishnan-Mosh.pdf (Section 6)
- boneitis 6y agoI got around the `tmux` barrier by writing down my most useful commands on an index paper, cutting it into the smallest rectangle I could (and folding in half), and tucking it in the pocket of my phone's flipcase (or you could stick it inbetween your smartphone and its back-shell). I'm pretty happy I got over that hurdle.
- ROARosen 6y agoI use tmux when when ssh-ing from an iPhone (which kills background apps after 10s), it works great for me. I also use it when I know I'll need to finish something on a different machine.
- hosteur 6y agoWhich ssh client do you use? Is it free software? And if not, how do you trust it not to steal your keys?
- ROARosen 6y agoI use termius. They're quite reputable (and YC backed [1]). You're right about the keys if I'd be syncing them. But for my specific use case I happen to use passwords for these servers. [1] https://termius.com/about https://termius.com/about
- wnoise 6y agoI hate tmux because the way it handles switching windows is terrible. The model is switching between windows, each of which can have some layout of panes. This is approximately never what I want for a long-running thing I can detach from and reattach to, from a different terminal with different connections. Further, it supports multiple attachments by each having them see the same exact thing. For terminals that are different sizes, it shoves everything into an area the minimum height and width of all attached clients, and displays everything outside that as a field of periods. I really prefer screen's functionality, instead. Each pane can be independently switched to any of the pool of underlying ptys being managed. The exact layout of panes is more of an ephemeral thing. On wide terminals I can split side-by-side, on narrow ones I can split top-above-bottom (and these can even be different for different clients connected to the server). It handles the multiple attached clients by only make I think tmux's model is due to being too closely modeled on GUI virtual desktops. That rant aside, tmux does have some nice features available by default that take a fair bit of configuration to get working well in screen.
- flaxton 6y agoExcept that screen is dead :-/
- rhizome 6y agoDead? 4.8 came out less than a year ago and there was a patch less than a month ago. https://git.savannah.gnu.org/cgit/screen.git/ https://git.savannah.gnu.org/cgit/screen.git/
- em-bee 6y agotmux supports multiple sessions and switching between those. sessions behave independently like your screen windows. you can of course have multiple windows in each session, which then behave the tmux way. you can also have the same window show up in multipe sessions and use that to emulate screen behavior. (i saw a script to help with that some time ago) for me, multiple sessions alone provide enough flexibility.
- 6y ago
- steventhedev 6y agoAs others have pointed out, mosh doesn't support port forwarding, and because ssh doesn't support udp forwarding, can't easily be used with proxyjump servers. Story time: I had tmux sessions active on all our servers and would simply ssh into my work laptop from home, so the sessions were never really closed. One day, I decided to upgrade from 1404 to 1604 and closed out all my sessions (including on the servers because I was pushing out a new tmux config). After 5 minutes we started getting smss that the system was down and couldn't write to disk. One of our production servers had been set up with an encrypted home folder and when my session closed out, it closed the encrypted folder. Unfortunately, the ssh folder wasn't outside the encrypted portion, so we had to use IPMI to restore access. That's the story about how we started joking that closing my laptop is a great way to break the production system.
- teddyh 6y agoThis kind of thing is why I have always been very sceptical towards encrypted home directories, and have always advocated for full disk encryption.