Home > ssh > Is there an SSH client which duplicates commands to multiple terminals?

Is there an SSH client which duplicates commands to multiple terminals?

April 23Hits:2
Advertisement

I'd like to control several ssh connections from one terminal. For example, I would type ifconfig in the main terminal and all the other ssh connections would run ifconfig. That's what offered PuttyCM on Windows Is there an SSH client which duplicates commands to multiple terminals?

.

This may be a very simple question but I did not manage to find such a ssh connection manager. I would not be too hard to code but it surely already exists. Could you give some hints?

Answers

Cluster SSH

Cluster SSH is used to start multiple SSH connections in separate terminal windows, with a common input box. You type in the input box and the keystrokes are sent to all the connected terminals.

sudo apt-get install clusterssh

Then run cssh:

cssh host1 host2 ...

Use a terminal emulator with broadcasting

Terminator, for example, is a terminal emulator in which you can broadcast keystrokes to a group of terminals.:

Is there an SSH client which duplicates commands to multiple terminals?
Is there an SSH client which duplicates commands to multiple terminals?



Depending on how many connections you make, Cluster SSH might be the better option. However, it uses xterm for the terminal emulator, which may not be what you are used to. It is, however, much more easy to get started with a number of connections using cssh, than to create a lot of splits and group them in Terminator. For example, this is what cssh osl-{01..95} gets me:

Is there an SSH client which duplicates commands to multiple terminals?

The terminal windows were are all resized and tiled nicely. The gaps are for windows that were closed because the connection failed.

There are many options to achieve what you want. My favorite is pssh (Parallel SSH). It can run commands parallely on multiple hosts and have variety of options.

You can install it by:

sudo apt-get install pssh

pssh has some added advantages like it will be installed with parallel-scp, parallel-rsync binaries to do as their names suggest.

Here is an example to run whoami command as user foobar on two hosts using pssh:

parallel-ssh -iAH "host_1 host_2" -l foobar "whoami"

Check man pssh or here to get more idea.

Related Articles

  • Is there an SSH client which duplicates commands to multiple terminals?

    Is there an SSH client which duplicates commands to multiple terminals?April 23

    I'd like to control several ssh connections from one terminal. For example, I would type ifconfig in the main terminal and all the other ssh connections would run ifconfig. That's what offered PuttyCM on Windows . This may be a very simple question b

  • How to execute a command in multiple Terminals by executing a command in only one?

    How to execute a command in multiple Terminals by executing a command in only one? December 1

    This question already has an answer here: Is there an SSH client which duplicates commands to multiple terminals? 2 answers I am going to have multiple machines that I am going to connect to via SSH so I am going to have multiple Terminal windows up,

  • Utility to send a command to multiple terminals?September 15

    A while ago when I did a lot more system admining, there was a little utility that would send a command to multiple terminals that I had open. So essentially I could ssh into three different servers, then type tail -f /var/log/some_error.log into the

  • SSH client and Command Prompt replacements Windows look-and-feelJune 9

    The Problem I've worked exclusively in Windows. I can handle that. I've worked exclusively in DOS (a long time ago!). I can handle that. I've worked exclusively in Unix. I can handle that. Right now, I am developing a command-line (python) applicatio

  • Pretty SSH client for OSX? January 8

    I know cyberduck is a good ftp/sftp client, but what about a pretty ssh client that is at least separate from the terminal. I want to be able to leave it running with a reverse ssh tunnel so that I can access my dorm room computer from anywhere. Chee

  • Where to find file transfer history from a SSH client (Debian/Linux)?April 5

    Help!! Have you ever tried dragging a folder to another folder by mistake in a graphical SSH client? Well, I did this morning, and since I wanted it to stop immediately (I could see it was about to move hundreds of files), I closed down the client by

  • is there any command like "wall" that runs a "command" in all terminalsJuly 5

    as you know "wall" command sends a message to all terminals: wall message now my question is this: is there any command that can send a "command" to be run in all terminals? for example sending clear command to all terminals , so then

  • Are there any command line SSH clients available for rooted Android phones?September 21

    I of course have ConnectBot, but I'm looking for something I can script. Edit: To clarify here, I'm not interested in running scripts from a terminal. What I want to do is run an SSH command in an automated/scheduled manner. Tasker and Locale Execute

  • Bash-like command substitution in ssh or How to request things from ssh *client*?July 10

    In bash (and other shells) it is possible to insert the result of a command into a command line using something like $() and `` (backticks). Now it would be nice if you had something like that but for ssh sessions. So you are in an ssh session and ne

  • How to configure ssh client to automatically execute commands on connect?November 20

    I frequently connect to servers through a user I share with other colleagues, every time I connect to each server I execute a couple of commands like bash, set -o vi, etc. I would want to know if there is a way to tell the ssh client utility to execu

  • Putty - equivalent Mac SSH client and commandsDecember 1

    I'm trying to find out what the equivalent Mac SSH client is and set of commands are that would achieve the below. In Windows we use the Putty CLI utility 'Plink' to set up a SSH connection to a SSH server for web proxying purposes. plink -l username

  • SSH command has no -Z option - Obfuscated ssh clientMarch 21

    I am working on a project remotely, and I have MACOSX 10.7.4 installed. The server is Ubuntu linux based, and I use "ssh" to access it. Recently the openSSH server in the remote server being secured by obfuscated ssh, so I have to login it with

  • Putty SSH client command history? January 28

    This question already has an answer here: View history of commands ran in terminal 3 answers I connect to my server via Putty SSH client. With the key ↑ I see previous entered commands, one by one. I just wondering is there a some command, which show

  • Proper way to send SSH commands to multiple clients with sudo?February 11

    I have created a very simple shell script to send SSH commands to multiple hosts. Right now I have copied my ssh id so I don't have to use a password to login to the servers. But if I want to do a apt-get update for an example then I have to login as

  • Why does Midnight Commander look crap in SSH clients?June 1

    Why does MC look like this in SSH clients (I've tried PuTTY and MindTerm) and how to fix it? On the server side is fresh installed 64-bit Ubuntu 10.04 Server. On the client side is XP SP3. --------------Solutions------------- This has been addressed

  • VNC via SSH with a single commandMay 5

    I have a VNC server (x11vnc) configured to allow me to log into the machine at the local display (:0) via SSH tunnel, following the instructions here. My question: is there a way to create the tunnel AND launch vncviewer with a single command/script?

  • How can I use ssh to run a command on a remote Unix machine and exit before the command completes?July 19

    How can I use ssh to run a command on a Unix machine and exit before the command completes? For instance, if I type ssh localhost 'sleep 60 &' ssh hangs on my terminal until sleep completes, even though sleep is run in the background. --------------S

  • SSH clients (putty/ZOC/xterm) no longer using tab completion not recognizing arrow keys?August 17

    All of a sudden, SSH clients to my web server don't recognize tab for file name completion, and rather insert a physical tab. Also, the arrow keys throw up garbage characters in terminals, rather than moving the cursor. Ideas? --------------Solutions

  • backspace does not work on my ssh clientDecember 2

    I SSH into a unix server using SSH client version 3.2.9. Several key features do not work when i'm logged into the server. to name few: backspace (^H is made instead but shift+backspace works), when i press <tab> I do not get suggestions, ~ does not

  • Reputable web based ssh client? March 17

    I'm connected to a coffee shop's wireless network right now, and I suspected I'd be able to use my laptop and ssh somewhere. Unlucky me they seem to be blocking everything but web traffic (my testing seems to show everything but port 80 is working, c

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.603 s.