Posts Tagged ‘ssh-copy-id’

ssh-copy-id automation with a list of hosts

Here’s another version of my ssh-copy-id script this time using a text file containing a list of hosts. The hosts file should contain a single host per line. #!/bin/bash export SSH_USER=”user” read -s PASSWORD export PASSWORD while read HOST; do export HOST; expect -c ‘ set SSH_USER $env(SSH_USER) set HOST $env(HOST) set PASSWORD $env(PASSWORD) spawn […]