The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-30-2004
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
See the man page for ssh.

Example in csh

#!/bin/csh
set hosts="sys1 sys2"
foreach x ($hosts)
ssh $x find /export/home -name "blah"
end

You would have to set up that the account that runs this can ssh without needing to put in a password - see the man page for ssh - look for the RSA authentication.
Reply With Quote