Skip to content

Instantly share code, notes, and snippets.

@akamiya
akamiya / tmux-multi-ssh
Created March 4, 2025 11:13 — forked from yosugi/tmux-multi-ssh
tmuxで複数にsshしてコマンドシンクするスクリプト by @mikeda
#!/bin/bash
#
# http://tech.naviplus.co.jp/2014/01/09/tmuxで複数サーバの同時オペレーション/
#
if [ -n "$SESSION_NAME" ];then
session=$SESSION_NAME
else
session=multi-ssh-`date +%s`
fi
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@akamiya
akamiya / ssh-multi.sh
Created July 21, 2017 16:03 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@akamiya
akamiya / ssh-multi-ec2
Created July 21, 2017 16:02
a script to ssh multiple servers over multiple tmux panes
#!/bin/bash
# ssh-multi-ec2
# based on ssh-multi by D.Kovalov
# https://gist.github.com/dmytro/3984680
# in turn based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
# customized for ec2