From: Roland G. <rgi...@cp...> - 2007-07-18 12:19:02
|
On 7/16/07, Bryan Bueter <br...@bu...> wrote: > I persued Net::SSH2 over a year ago for just this purpose. You can read > the thread I had with the author here: > > http://sourceforge.net/mailarchive/message.php?msg_id=200601192208.43932.dbrobins%40cpan.org > > Basically David Robins stated this: > > Ah, then there's the problem. Fileno tries to get a real Unix filehandle out > of the object; since it isn't a real Unix file, you won't get one. > > I could not get it to work, and David seemed to think that it should not > work. In that thread there is very simple code that I wrote and even that > doesnt work. I think all that would be needed is that Net::SSH2::Channel returns the fileno of the socket connection. Expect needs a real fileno to do a select() on it, but everything else is done via the object. Ideally, Net::SSH2 should be rewritten as an I/O filter ala PerlIO::gzip. Well, one may dream... :-) > However, all that aside, even without using Expect, Net::SSH2 was not > thread safe. I sent emails regarding that as well, to no avail. At this > point in time, I really think Expect on top of a spawned ssh command is > the best way to do things (from a perl perspective). I browsed through the source and didn't notice anything obvious that could hinder thread-usage. Can you remember what it was that was not thread-safe? Yeah, let's stick to ssh for now, nothing wrong with that. But please, people, remember to not use password-authentication... Best regards, Roland |