tssh (TmuxSSH) provide a way to connect to multiple ssh hosts easily, based on a list of clusters defined in the configuration
- tmux installed
$ brew install tmux
$ apt update && apt install tmux
$ git clone https://github.com/Chr0my/tssh.git ${WORKDIR}/
$ cd /usr/local/bin
$ ln -s ${WORKDIR}/tssh/tssh.sh tssh
$ cp ${WORKDIR}/tssh/tssh.conf.dist ${HOME}/.tssh.conf
Then reload your shell.
The configuration file .tssh.conf
contains all clusters and is easily modifiable
This will open a new splitted tmux window
$ tssh
Here the list of clusters.
Use "tssh list [cluster_name]" to list all hosts in the cluster
0) : testing_cluster1 1) : testing_cluster2 2) : testing_all 3) : prod_cluster1
Select a cluster to connect to:
$ tssh list testing_cluster1
host1
host2
$ tssh list testing_all
host1
host2
host3
host4
If you want to add a cluster:
In ${HOME}/.tssh.conf
:
new_cluster="host1
host2
host3"
all_clusters=(
testing_cluster1,
testing_cluster2,
[...]
new_cluster)