chain a series of SSH logins and process killing
I need to log onto 100 pc's and stop the processes ran by a certain user on them. Manually I would say
ssh comp01
killall -u user
Which also logs me out of the computer, so then I can run.
ssh comp02
killall -u user
etc
is there a way to automate this for comp01-99?
Edit: I've tried `ssh comp01 & killall -u user` but that also kills the main ssh session that I am in to access comp01-99
Using brace expansion:
for i in {01..99}; do ssh comp$i killall -u user; done