Re: Net::SSH::Perl slower than expected



are you sure the slowness is coming from
the cmd portion of the module opening a new channel each time it
executes a cmd?

Yes, I checked it. Mine takes a while to log in too, but the slowness
I'm talking about appears every time I send a command.

If it actually is openning a new channel each time, that would indicate
that it's using SSH-1 instead of SSH-2. You probably should, if you're
not already doing so, specify the protocol in the connection statement.

Yeah, that's what I thought at first too, but I checked, and I'm using
protocol 2 exclusively.

I'm not sure if that message is telling you that it's creating a new
channel or just verifying that the previously established channel is
still open.

Me neither. I don't really know what it means by 'channel', but every
time I send a command, it increments by one, so that's why I think it's
opening a new channel each time.

Anyway, I've managed to solve my problem very satisfactorily by
rewriting my script using an Expect wrapper. Using Expect gives me
exactly the kind of ptty control I was looking for (maybe everyone who
is in the know just goes straight to Expect, which would explain why
there haven't been any bug fixes or updates to Net::SSH::Perl in
months).

.



Relevant Pages