If you have a
bash script with a
while loop that reads from
stdin and uses
ssh inside that loop, the
ssh command will drain all remaining data from
stdin1. This means that only the first line of data will be processed.
A flawed method to run commands on multiple systems entails a shell while loop over hostnames, and a Secure Shell SSH connection to each system. However, the default standard input handling of ssh drains the remaining hosts from the while loop