[Ssh-sftp-perl-users] Using Net::SSH2 as a file handle
Brought to you by:
dbrobins
From: Bryan B. <br...@bu...> - 2006-01-19 20:01:31
|
Greetings, Some time ago I used Net::SSH::Perl, but gave it up for Expect. Now I'm back looking at Net::SSH2, but would still like to put expect on top of it. I want to use Net::SSH2 because it appears thread safe, while spawining a process with a tty in expect for perl is not. What I want to do is create a Net::SSH2 object, connect, get an interactive shell, and interact with it via a file handle. Then i can use expect on top of that and do whatever I like. I dont fully understand channels, but from what I remember with Net::SSH::Perl, a new channel had to be created every time you sent a command. But now there is a Net::SSH2::Channel->shell() function, perhaps there is a way to launch a shell on a channel and interact with that? I see Net::SSH2::Channel is itself a tied filehandle, but attempts to directly manipulate that dont result in what I expected. Thanks. Bryan http://www.sourceforge.net/projects/rover |