From: bob Date: 2005-10-11T04:01:54+09:00 Subject: Re: documentation & tutorials for net::ssh > See the last paragraph of http://net-ssh.rubyforge.org/ > chapter-3.html#s2. Basically, session.loop accepts an optional block > that should return true as long as the loop should continue. > > Normally, the loop continues while all channels are open, but in your > case, a tail -f will never close by itself. > > - Jamis That's as much as I had worked out. Reading the guide suggested to me that it wasn't ending because the channel was still open, so I started trying to use channel.close in various places to make it close, but it never did what I wanted it to do. I did get it to close & end the script, but only before the result of "tail /var/log/messages" was output to the shell (or browser, when run as a cgi script). I didn't know where to begin, when it came to adding an optional block of code, and didn't start because I wasn't 100% that was what I needed to do. Any clues anyone, please ? I'm going to have a go at working out what I should do, but would greatly appreciate the answer from someone who knows :-)