set hosts to {"citadel-station.mit.edu", "aperture-science.mit.edu", "shadow-moses.mit.edu", "arklay-mansion.mit.edu", "xvm.mit.edu", "xvm-remote.mit.edu", "xvm-console.mit.edu", "black-mesa.mit.edu", "torchwood-institute.mit.edu", "xvm-dev.mit.edu", "xvm-remote-dev.mit.edu", "xvm-console-dev.mit.edu"} tell application "Terminal" activate tell application "System Events" to tell process "Terminal" to keystroke "n" using command down set onFirst to true repeat with host in hosts if onFirst is true then set onFirst to false do script with command "kdo ${ATHENA_USER:-$USER}/root /dev/null" in selected tab of the first window else tell application "System Events" to tell process "Terminal" to keystroke "t" using command down end if do script with command "kdo ${ATHENA_USER:-$USER}/root ssh -o GSSAPIDelegateCredentials=no root@" & host in selected tab of the front window do script with command "aptitude update && aptitude dist-upgrade --without-recommends" in selected tab of the front window end repeat end tell