Question

Every day I run same ssh(succeeded by entering password) on 3 or more terminals. Is there any way to run same command parallely on all the terminal tabs opened on gnome-terminal. It can be ssh or cd any any other command. I know this feature is there in Konsole(from KDE) but not in gnome-terminal. Thanks

Was it helpful?

Solution 2

Terminator terminal supports the function you are looking for. You can find more information here. I am using this program every day. It is a very useful piece of software.

OTHER TIPS

To open tabs in gnome-terminal with a predefined commands (i.e. ssh server1, ssh server2, ...) you can use a command

gnome-terminal --tab -e "ssh server1" --tab -e "ssh server2"

And, it was previously mentioned, you should use key authentication to not to enter your passwords every time, but if you can't, change your ssh command to

sshpass -p 'mysecretpass' ssh server1

In addition to this, you can create a script file with the sshpass command and pass it with the -e option while creating the terminal.. this would further simplify things.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top