V
V
Vi2016-02-19 15:18:05
linux
Vi, 2016-02-19 15:18:05

SSH without password to 10000 servers?

In general, there are of course not 10,000 servers, but quite a lot, how can you go to the first server and throw a key there, and going to subsequent authentication also proceeded by key and not by password?
Well, or how can this action be organized in order to make fewer movements, copy to all servers by key for too long

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Saboteur, 2016-02-19
@saboteur_kiev

No way, you need to configure each server for the first time (throw the key there).
It all depends on how much access you already have to those servers, but even chief or puppet and all that stuff needs all servers to be preconfigured with key access.
Usually, this situation does not arise suddenly - the installation of the OS on many servers is automated, and during the installation process, a user is also created and an ssh key is uploaded to it, on behalf of which you can then massively manage it.

I
Igor Nikolaev, 2016-02-19
@nightvich

There are at least 2 ways to do this.
one)

#!/usr/bin/expect -f
spawn ssh-copy-id $argv
expect "password:"
send "YOUR_PASSWORD\n"
expect eof

Save and run: ./login.expect [email protected]
2) https://linuxcluster.wordpress.com/2012/06/11/auto...

V
Vladimir Kuts, 2016-02-20
@fox_12

The fastest thing for your tasks is a system for centralized management of multiple servers. Take a look at Ansible
for example - maybe this is what you need.

V
Vladimir, 2016-02-19
@qDiablo

ruunix.ru/642-ssh-bez-paroly-ili-po-kluchu.html

K
krypt3r, 2016-02-19
@krypt3r

Keys must be on all servers. Make a list of servers and use expect for bulk upload. Or one of the deployment systems (here I don’t rummage, google it).

F
fokin_nikolay1989, 2016-02-19
@fokin_nikolay1989

Install pdsh rus-linux.net/lib.php?name=/MyLDP/admin/pdsh_paral...
And you will immediately be able to manage servers, for example, write
# pdsh serv0
AUTHORIZATION by RSA key
serv0#
even if the password is changed to root on that machine , you can log in as root without any problems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question