• mranderson17@infosec.pub
    link
    fedilink
    arrow-up
    3
    ·
    10 months ago

    Mosh hasn’t had a release in quite a while (Oct 2022). While that’s not that old, and there does appear to be somewhat active development, it’s a little slow moving for something that might be open to the internet directly. I used to use it but ssh with tmux is mostly fine and makes me feel a little safer because of their wider use.

  • bionicjoey@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    Mosh is great but it annoyingly doesn’t preserve scrollback. So it needs to be combined with something like Tmux if you want to be able to see more than one page of terminal.

  • confusedalex@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Using fish with mosh always wasn’t quite working as I wanted. The auto completions were always behind.

  • lntl@lemmy.ml
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    10 months ago

    Personal bias: I’m a SSH/tmux zealot

    How is this different/better than connecting to a tmux session on a remote machine?

    • mozz@mbin.grits.devOP
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      When you push up, up, Ctrl-A right right right, you don’t have to sit there for 5 seconds and wait for the machine to decide it feels like fulfilling your request and showing you where the cursor is now so you can get on with what you were doing.

      If you’re not on flaky wireless networks a lot it might not be a huge difference, but from my experience today it was a big difference.

      • lntl@lemmy.ml
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        10 months ago

        Ctrl-a! love learning new things

        Thanks for sharing :)

        • mozz@mbin.grits.devOP
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          Haha no problem. Yeah, Ctrl-A, Ctrl-R, Ctrl-K, and Ctrl-right/left are godsends for mucking around in the terminal, in case there were others of those you didn’t know. Probably there are lots more but those are the ones I use all the time.

    • Jordan_U@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      10 months ago

      Tmux allows you to reconnect to a session, and helps guarantee that you will always be able to get back to your long running processes. For important long running processes, I still use tmux with mosh, because if the mosh client is killed (or you’re trying to “re-attach” from a different device, mosh won’t let you “re-attach” to that “session”.

      Mosh allows you to roam, and suspend your machine, and whenever you resume it again, whatever network you’re now on, the connection is basically instantly re-established. You can often roam from WiFi to cellular data without even noticing. (Great when working from a phone, or just a laptop)

      In my opinion, they are mostly orthogonal (and complementary).

      Here’s the list of features from the home page. I’ve added my own comments after ‘*’. If there is no ‘*’, then the feature doesn’t exist for tmux (because it’s outside the scope of tmux):

      Change IP. Stay connected. Mosh automatically roams as you move between Internet connections. Use Wi-Fi on the train, Ethernet in a hotel, and LTE on a beach: you’ll stay logged in. Most network programs lose their connections after roaming, including SSH and Web apps like Gmail. Mosh is different.

      Makes for sweet dreams. With Mosh, you can put your laptop to sleep and wake it up later, keeping your connection intact. If your Internet connection drops, Mosh will warn you — but the connection resumes when network service comes back.

      Get rid of network lag. SSH waits for the server’s reply before showing you your own typing. That can make for a lousy user interface. Mosh is different: it gives an instant response to typing, deleting, and line editing. It does this adaptively and works even in full-screen programs like emacs and vim. On a bad connection, outstanding predictions are underlined so you won’t be misled.

      No privileged code. No daemon. * Same for tmux, but that’s less interesting since tmux is not a network service You don’t need to be the superuser to install or run Mosh. The client and server are executables run by an ordinary user and last only for the life of the connection.

      Same login method. * Not really relevant to tmux, which doesn’t handle auth Mosh doesn’t listen on network ports or authenticate users. The mosh client logs in to the server via SSH, and users present the same credentials (e.g., password, public key) as before. Then Mosh runs the mosh-server remotely and connects to it over UDP.

      Runs inside your terminal, but better. * This is common to both Mosh is a command-line program, like ssh. You can use it inside xterm, gnome-terminal, urxvt, Terminal.app, iTerm, emacs, screen, or tmux. But mosh was designed from scratch and supports just one character set: UTF-8. It fixes Unicode bugs in other terminals and in SSH.

      Control-C works great. * Tmux can help with this too Unlike SSH, mosh’s UDP-based protocol handles packet loss gracefully, and sets the frame rate based on network conditions. Mosh doesn’t fill up network buffers, so Control-C always works to halt a runaway process.