1. 53

tl;dr - mosh, tmux, htop, and ranger

  1.  

  2. 13

    I did not know ranger. Thanks for the hint.

    1. 7

      These are honestly some of the best tools I have used for managing servers.

      Ranger is amazing when you just want to browse a few files and having a terminal multiplexer can change your whole workflow.

      1. 5

        mosh is amazing. I discovered after ~3 months of dropped ssh connections over a very poor internet connection. If only port forwarding was possible.

        1. 4
          1. 2

            If only there was a native Windows client …

            1. 2

              Port forwarding is absolutely possible: Use ssh for it.

              If you want a proper VPN that stands up to a lossy connection, use IPSEC with a dummy network.

              mosh is secure remote desktop for terminals: Such a thing didn’t exist before mosh (or it wasn’t very good), but forwarding TCP is a solved problem.

            2. 4

              I guess that this relates to specific usages on how the author uses his server(s).

              I rarely ssh to servers so my pick would be:

              • anything that allows you to provision your server (configuration management agents) and then use it to install:
              • security tools (ufw, selinux, …)
              • remote monitoring (exporters for prometheus, …)

              For example I don’t need at all ranger on my servers.

              1. 4

                If you have python installed, I like glances for a system monitoring program. I leave a copy running all the time, even on my X system at home.

                1. 3

                  I could never get into glances, just because it seems like such a resource hog compared to top.

                2. 4

                  Why run mosh when you already use tmux, which can also keep your programs open?

                  1. 5

                    In addition to keepalive, you know when you accidentally cat a gigantic log file over ssh and have to wait hours for it to scroll by or kill the session? mosh prevents this and jumps to the end of the out. Granted, you lose scrollback due to this, so it’s a tradeoff.

                    1. 3

                      I like that. This feature encourages me to switch to mosh. Does mosh support the same features that latest OpenSSH client supports? I mean ProxyJump, ED25519, reading from .ssh/config etc.

                      1. 2

                        Not sure about the prior two (although I suspect both work, just never tried) - it definitely reads from .ssh/config tho

                    2. 3

                      Mosh keeps the session alive when my laptop sleeps or I close the lid, so I don’t have to re-authenticate. If I lose the session over regular ssh, then I believe the tmux instance would die instead of simply detaching, so I wouldn’t be able to resume anyway.

                      1. 4

                        I use tmux in connection-breaking situations and it simply detaches.

                      2. 3

                        tmux is for N-to-N sharing of a terminal: run multiple programs on the server at the same time, see them from some number of clients, isolate them from client-server connection termination.

                        mosh is for making client-server connections more robust. If you close your computer in one place and reopen it in another, it keeps going instead of needing you to hit up and enter twice to reconnect and tmux attach. This is invaluable if some part of your link is flaky, like oversubscribed conference wifi, or the connection between a moving vehicle and a terrestrial network.

                      3. 3

                        no VIM ?

                        1. 2

                          Of course I use vim :) but it’s usually pre-installed on Debian I believe, no?

                          1. 3

                            isn’t Vi the default? :)

                            1. 5

                              You’re probably correct, I should add a note about the necessity of vim. (Don’t tell the church, but I’m actually an evil emacs user who also uses vim because it fits in a tmux pane better.)

                              1. 5

                                On Debian, its a build of Vim stripped down and set to Vi-like defaults. Full Vim can be installed, of course.

                          2. 3

                            dstat: the best first-glance at what a system is doing in terms of where CPU is spent, how much IO is happening, paging etc… When I put on my SRE hat, this is the first thing I type on a problematic system.

                            iftop: where is network traffic going

                            iotop: what process is using io

                            ltrace/strace/ftrace/perf/tcpdump/ptrace/BPF-based/gregg tools for further drilling

                            1. 0

                              “close my laptop and bike to the coffee shop”

                              *cough* hipster.

                              1. 2

                                Hipsters make the best coffee ;)

                                1. 2

                                  And ride the worst bikes. I bet they don’t even have shocks or pegs, or nun chuck skills.

                                  1. 2

                                    I think my bike isn’t too bad. I put some thinner tires on it and some packs for commuting. No shocks or pegs unfortunately, but it sure is comfortable and easy to ride.