in reply to simple iterate and run cmd script
So in what way does it not work? Do you have any error messages? Is ssh failing because it is waiting for a password?