The ssh call inherits its standard input from the while loop, which is redirected from your file. This causes the ssh command to consume the rest of the file. To provide the read command, you need to use a different file descriptor:
#!/bin/bash FILE="myfile.txt" while read -u 3 server cpid; do printf "$server---$cpid---" ssh $server "grep $cpid /var/cpanel/repquota.cache | awk '{print int($3/1000) \"MB\"}'" done 3< $FILE
An alternative is to explicitly redirect input to ssh from /dev/null , since you are not using it anyway.
#!/bin/bash FILE="myfile.txt" while read server cpid; do printf "$server---$cpid---" < /dev/null ssh $server "grep $cpid /var/cpanel/repquota.cache | awk '{print int($3/1000) \"MB\"}'" done < $FILE
source share