#!/bin/bash for i in 2 3 4 5 6 7 8 9 10 11 12 do ssh gazelle@ehealthsuisse$i.ihe-europe.net "sudo sed -i 's/1.jks/truststore.jks/g' /etc/init.d/jboss" ssh gazelle@ehealthsuisse$i.ihe-europe.net "sudo /etc/init.d/jboss restart" done