The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 04-25-2008
fabtagon fabtagon is offline
Registered User
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 183
First of all it's bad practice to allow root logins via ssh. You have been warned ...

There's a backtick (`) missing at the end of the echo line.

(a better looking option would be the following inside the loop (no redirection at the end of the loop then)

echo -n 10.72.169.$i >> result
ssh -o ConnectTimeout=3 root@10.72.169.$i "hostname; cat /etc/redhat-release" >> result
Reply With Quote