Table of Contents

Introduction

Multi SSH shellscript written in Bash to execute a single command on one or many target hosts via ssh. A target host can define a jumphost if it is not accessible directly.

The initial purpose was to make system updates on many servers with a visualisation which server was updated successfully / already and which not.

The script is designed to run in interactive mode but supports a few command line parameters for scripting too.

In a server configuration file you can put your servers. Each server can have

  • multiple tags, eg. for OS/ for hardware os VM/ for application/ for maintenance group
  • optional: a jumphost (if it is not accessible directly).

The script is designed to run in interactive mode but supports command line parameters for scripting too.

In the interactive mode you see a list of servers of a selected profile (and maybe filtered by tags). You can run a selected command an one or many servers. Each command will be in an extra terminal that stays open as long the process is finished and you press RETURN.

In the server list a timestamp will be shown when a command was successful. This is can be used as a checklist to rollout a command on all wanted servers.

Requirements

  • Bash
  • GNU tools
  • OpenSSH client
  • console tool supporting parameter -e (eg. gnome-terminal, xterm, konsole)

The script was written on Linux.

It was not tested on other OS - but it “could” run. On MS Windows you can use WSL or Cygwin / MSYS or similiar compiled binaries. Mac OS ensure to have GNU variants of tools like sed, grep, … in the PATH.