SSH Script to replace RSH Script
Here is my dilemma:
I want to shutdown a number of computers in my lab. Hostnames are jmud1, jmud2, jmud3 and jmud4 .... jmud20.
Current script or command used:
#!/bin/csh
foreach num (`/root/tools/machines`)
rsh jmud{num} /sbin/shutdown -hy 0 &
end
#End of Script
The file "machines" have the numbers of my hosts 1 - 20.
How do I replace is with ssh or something useable in RHEL5?
Last edited by felton57; 09-24-2010 at 09:26 AM.
|