Skip to content

Instantly share code, notes, and snippets.

View orangewolf's full-sized avatar

Rob Kaufman orangewolf

View GitHub Profile
@lalyos
lalyos / multi-ssh-tmux-ansible.md
Last active January 22, 2021 06:44
multi ssh with ansible or tmux

run a netcat server in one terminal/tmux pane and a client in a different one. Now all lines entered in the client side, will be "typed" into multiple ssh sessions.

ansible version

In this version all output comes back in a single stream:

nc -lk 12345 | while read line; do ansible -u centos -i hosts all -m raw -a "$line"; done

tmux version