|
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
|