I’m just using the Cosmic Terminal that’s part of the Pop!_OS Cosmic Alpha, but I ran into similar issues with Gnome terminal and even with Termius.

Scenario: I’m currently working on leveraging a VPS to act as the gateway to my homelab so I have one ssh session to Unraid server and one to VPS. One in each tab. Obviously the name shows up as what the username@servername is called in each tab. But I keep getting tripped up and sometimes try to do something from the wrong machine. Once I even failed to realize that the ssh session to one of them cut out and I was back on my desktop and took me an embarrassingly long time to realize why stuff was failing.

So what are y’all using to keep that organized in your work flow? Separate terminal windows instead of tabs? Some shell customizations to make them look different than one another? Or just so ingrained in your brain that you never have this problem?

EDIT: Thanks, everyone! Sounds like a terminal multiplexer is the ticket for me.

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 days ago

    You’ll get used to it eventually, but you can e.g. tweak your PS1 to an all-caps hostname, or use a custom tmux layout with dedicated panes for each box you connect to.

    • IsoKiero@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      You’ll get used to it eventually

      I’ve been earning my living mostly with connecting to remote systems via ssh (and other means) for quite a few years and I still occasionally mess up and enter commands on a wrong terminal. Less now than I used to, but it still happens. The trick is to learn youself to pause for a second and confirm the target for any potentially destructive or otherwise harmful command, no matter if it’s locally or to some server other side of the world.