I have a couple of maschines to maintain. I want to have the capability to install a package on all maschines at once. What is the easiest way to do that using ubuntu?
Here is an example of how I tried to install texlive-full on all maschine in parallel using parallel-ssh:
parallel-ssh -i -H "myAdminName@comp1 myAdminName@comp2 myAdminName@comp3" -A -l root sudo apt-get install texlive-full -y
Unfortunately this gave me the following error:
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password:
[1] 12:28:01 [FAILURE] myAdminName@comp1 Exited with error code 1
Stderr: sudo: no tty present and no askpass program specified
[2] 12:28:01 [FAILURE] myAdminName@comp2 Exited with error code 1
Stderr: sudo: no tty present and no askpass program specified
[3] 12:28:01 [FAILURE] myAdminName@comp3 Exited with error code 1
Stderr: sudo: no tty present and no askpass program specified
Does anyone know how to fix that? I already placed a public-ssh key on all these maschines...
For administration of multiple machines I am using
clusterssh
. It allows parallel terminal sessions to all machines. In case you want to run a command specifically on one machine, you are able to select its window. In case you want to submit to a group of machines you can select all hosts which need to be addressed. Easy, isn't it ;) You can use a config file and assign a group of computers a nickname and startclusterssh
with that nickname instead of the list of machine names/IPs.I am using it for years now. Another possibility might be
tmux
, but I have to check the syntax for the parallel sessions.Edit: I am recognizing that you tried to do a non-interactive installation. The
clusterssh
opens terminal sessions, so that will be interactive. Due to you did not state if interactivity or non-interactivity is a requirement, I hope than interactive terminals are okay for you