+ log "processing host: '$host'"
+
+ hostKeyCachePath=$(process_user_id "ssh://${host}" "$cacheDir")
+ if [ $? = 0 ] ; then
+ ssh-keygen -R "$host" -f "$USER_KNOWN_HOSTS"
+ cat "$hostKeyCachePath" >> "$USER_KNOWN_HOSTS"
+ fi
+}
+
+# process known_hosts file
+# go through line-by-line, extract each host, and process with the
+# host processing function
+process_known_hosts() {
+ local cacheDir
+ local userID
+
+ cacheDir="$1"
+
+ # take all the hosts from the known_hosts file (first field),
+ # grep out all the hashed hosts (lines starting with '|')
+ cut -d ' ' -f 1 "$USER_KNOWN_HOSTS" | \
+ grep -v '^|.*$' | \
+ while IFS=, read -r -a hosts ; do
+ # process each host
+ for host in ${hosts[*]} ; do
+ process_host "$host" "$cacheDir"
+ done
+ done
+}
+
+# process an authorized_*_ids file
+# go through line-by-line, extract each userid, and process
+process_authorized_ids() {
+ local authorizedIDsFile
+ local cacheDir
+ local userID
+ local userKeyCachePath
+
+ authorizedIDsFile="$1"
+ cacheDir="$2"