Answer the question
In order to leave comments, you need to log in
How to scatter public keys with xargs, ssh-copy-id and sshpass?
I recently received a pack of 500+ servers that need to be managed in bulk, run the same tasks via ssh, etc. First you need to go through and upload public ssh keys for passwordless login.
I prepared a csv file with the data of servers like:
ip
; password
ip; password
ip; passwordcut -f 2 -d ';' /tmp/111/list.txt
cut -f 2 -d ';' /tmp/111/list.txt | xargs -I "%" sshpass -p % ssh-copy-id ./key [email protected]/code>
И теперь никак не соображу, как вместо ХХХХ подставить соответствующие паролям айпишники?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question