Posts Tagged ‘ssh-copy-id’

ssh-copy-id automation with a list of hosts

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

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. ?View Code BASH#!/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 […]