refactor ssh_all

move main command to function
use for loop for command-line server list and
while loop for text file list