:: Re: [DNG] mssh not working (Chimaer…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Lars Noodén
Ημερομηνία:  
Προς: tempforever via Dng
Αντικείμενο: Re: [DNG] mssh not working (Chimaera)
On 10/2/20 5:09 PM, Dimitri Minaev via Dng wrote:
[snip]
> If you could offer an alternative that provides synchronized input to a
> number of SSH sessions, I'd be glad to hear your opinion. I know that
> similar capabilities are found in Terminator and my favorite Konsole, but
> they are not as comfortable as mssh when you need to open a bunch of
> sessions.


You could use tmux(1) and launch many windows (not panes) each with an
SSH session. Then you could script something and run it in the first
(0th) window:

while read -p "cmd: " cmd;
do
        tmux list-windows \
        | awk -F: '{print $1}' \
        | tail +2 \
        | xargs -I{} tmux send-keys -t :{} "$cmd" C-m \;
done


Or if there are only a few sessions, you could make multiple panes in a
single window and use 'synchronize-panes'

/Lars