Re: [Ssh-sftp-perl-users] Using Net::SSH2 as a file handle
Brought to you by:
dbrobins
From: David R. <dbr...@cp...> - 2006-01-20 03:17:00
|
On Thursday January 19, 2006 09:02, Bryan Bueter wrote: > 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? There is. The shell() function just makes the channel a shell channel, and you can send commands to it. > I see Net::SSH2::Channel is itself a tied filehandle, but attempts to > directly manipulate that dont result in what I expected. In what way? If you can give details I'll try to fix them. -- Dave Isa. 40:31 |