[Trilug-ontopic] anyone using Net::SSH::Expect?

Greg Brown gwbrown1 at gmail.com
Mon Oct 18 12:05:54 EDT 2010

So.. I'm having to now use Net::SSH::Expect rather than the regular Expect
perl module (long story, blah blah).  Regardless I'm having some problems
passing port other than the default.  Here's how to connect using regular
Net::SSH::Expect code:


use Net::SSH::Expect;

$ssh = Net::SSH::Expect->new {


I've tried connecting to a different port (3007 in this case) in a couple
different ways.. one way was before the "login()" command using:


## run some commands here

$ssh->close();  # close the ssh session

Another was to put the port number after the password above that.  Neither
seem to work.  I can ssh from the command line to port 3007 of this router
with no problems from the same machine where the script lives.

Any thoughts?


Here's the Net::SSH::Expect support page..

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.trilug.org/pipermail/trilug-ontopic/attachments/20101018/9fa9f647/attachment.htm>

More information about the Trilug-ontopic mailing list