bash & OpenSSH scripting issue

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I swear I've done something just like this before, but of course I can't find the code. :eek:

This little loop isn't looping. If I remove the ssh line it works just fine and gives me the names of all of the systems. With the ssh line in there, I get the output of hostname for the first system only.

Anyone see my, most likely, stupid mistake?

EDIT: In case someone is wondering, the script is supposed to read the first system from the file $system_list. Then it will ssh to that system, and on that system run hostname, which the output of gets redirected to a file (temporary_output) on the local system. It should then get the next line in the file $system_list.

It works with just about anything else, just not SSH. I wish I could find my previous notes on this. :(
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I'd still like to know why the script in my first post doesn't work, but I made something that does. It's no less elegant really. ;)