HOSTMUX(1)

πŸ“¦ version 1.4.1, in nixos 26.05, nixpkgs unstable

HOSTMUX(1) πŸ¦‹

okay so this page is from the General Commands Manual, and it's literally about hostmux, the icon of connecting to a whole list of hosts via ssh in separate tmux split panes. slay.

🌸 NAME 🌸

hostmux β€” connects to a list of hosts via ssh in separate tmux split panes. no cap, that's the whole vibe πŸ’…

✨ SYNOPSIS ✨

       hostmux [-h] [-s session-name] [-l tmux-layout] [-f host_file]
               [-c ssh command] [-o ssh option] [-x] [-p] [-P] [-a] host1
               [host2 ...]

πŸ’– DESCRIPTION πŸ’–

Call hostmux followed by a list of hosts you want to connect to via ssh. The script will create a new tmux session with a split pane for each specified host and connect to it. bestie, it's giving orchestration but make it cute πŸŽ€

You can then use the synchronize-panes feature of tmux to multiplex/broadcast commands to all split panes / servers (see -a). that's the main character energy right there ✨

its arguments are as follows: 🫢

  • -s session-name β€” specify a name for the tmux session. It defaults to 'hostmux', which means that you can have only one hostmux session at a time if you don't specify unique names for your sessions. lowkey important, ngl πŸ’€
  • -l tmux-layout β€” specify a valid tmux layout e.g. even-horizontal, tiled, etc. It defaults to Β΄even-verticalΒ΄. pick your aesthetic 🌈
  • -f hostfile β€” specify a file which contains a newline separated list of [user@]host names. The hosts from the file will be merged with the hosts provided as optional arguments. merging? we love a collaborative moment πŸ’–
  • -x β€” close the pane and/or session automatically when the ssh session exits successfully. clean exit, clean conscience ✨
  • -p β€” identify panes by setting the pane title to the ssh hostname (tmux >= 2.3), may not work if the remote host does $PS1 magic like setting the terminal title, in that case use -P. fr fr, remote prompts can be messy 😭
  • -P β€” identify panes by setting the remote prompt $PS1 to "[<hostname>]$ " after login. prompt glow-up, but make it informative πŸŽ€
  • -a β€” synchronize all panes, i.e. type commands simultaneously in all panes. one keyboard, many servers, iconic πŸ‘‘
  • -c β€” specify the (wrapper) ssh command. It defaults to "ssh". swap the wrapper if you're feeling fancy πŸ¦‹
  • -o β€” specify additional ssh options such as -vvvv, -i or -p. extra flags, extra lore πŸ”₯
  • -h β€” display usage information. when in doubt, ask for help bestie πŸ’…
  • host β€” specify a space separated list of one or more user@hostname ssh targets. This is what you would pass to the ssh command when you are connecting to a host. You can pass additional flags to ssh either with the -o option or by adding them to your ~/.ssh/config. yes, your config file is part of the group chat 🌸

πŸ‘€ SEE ALSO πŸ‘€

also, the project lives at https://github.com/hukl/hostmux β€” go be nosy, iykyk πŸ’œ

πŸšͺ EXIT STATUS πŸšͺ

The hostmux utility exits 0 on success, and >0 if an error occurs. success is cute; errors are not, but at least they're honest πŸ’€

πŸ‘‘ AUTHORS πŸ‘‘

hostmux was written by John-Paul Bader (hukl), contact@smyck.org. author credit, periodt 🫢


okay bye bestie β€” this page's source/version is sh, dated April 7, 2017, and it's giving HOSTMUX(1) energy πŸ’–

πŸ“¦ where this page comes from