Net::SSH::Perl

R

Rick Thiessen

I am attempting to modify a control program to use ssl communicatoins.

It is to a cisco switch and requires a login to a secondary admin
level. This

area is accessed through a password.



I have been accessing this system but using a port 23 connection

socket and need to secure the port 23.



I have tried using the Net::SSH::perl module to push the commands

through and it works fine to the first layer of commands but is infact

connecting with every request and will not respond if there is no

newline from the remote on a password prompt.



How do I maintain a connection using ssh and how to I automate

the password check and response.



Is there a way of opening a socket connection to simulate

an interactive session with the remote ssh connection.



Rick
 
J

James Willmore

On 4 Nov 2003 20:16:14 GMT

I am attempting to modify a control program to use ssl
communicatoins.

It is to a cisco switch and requires a login to a secondary admin
level. This area is accessed through a password.

I have been accessing this system but using a port 23 connection
socket and need to secure the port 23.

I have tried using the Net::SSH::perl module to push the commands
through and it works fine to the first layer of commands but is
infact connecting with every request and will not respond if
there is no newline from the remote on a password prompt.

How do I maintain a connection using ssh and how to I automate
the password check and response.

Is there a way of opening a socket connection to simulate
an interactive session with the remote ssh connection.

There are a few options.

Ther are a few Cisco modules that _may_ help you out:
(http://search.cpan.org/search?query=cisco&mode=module)

You could also try using the Expect module
(http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod)

I suggest these because I'm not 100% sure that Net::SSH will do it for
you. However, I could be wrong :-(

Some could would be helpful :)

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Pohl's law: Nothing is so good that somebody, somewhere, will
<not hate it.
 
J

James Willmore

On 4 Nov 2003 20:16:14 GMT

I am attempting to modify a control program to use ssl
communicatoins.

It is to a cisco switch and requires a login to a secondary admin
level. This area is accessed through a password.

I have been accessing this system but using a port 23 connection
socket and need to secure the port 23.

I have tried using the Net::SSH::perl module to push the commands
through and it works fine to the first layer of commands but is
infact connecting with every request and will not respond if
there is no newline from the remote on a password prompt.

How do I maintain a connection using ssh and how to I automate
the password check and response.

Is there a way of opening a socket connection to simulate
an interactive session with the remote ssh connection.

There are a few options.

Ther are a few Cisco modules that _may_ help you out:
(http://search.cpan.org/search?query=cisco&mode=module)

You could also try using the Expect module
(http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod)

I suggest these because I'm not 100% sure that Net::SSH will do it for
you. However, I could be wrong :-(

Some could would be helpful :)

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Pohl's law: Nothing is so good that somebody, somewhere, will
<not hate it.
 
J

James Willmore

On Wed, 05 Nov 2003 15:58:19 GMT
<snip>

This one got away. Me and the newsreader got into a dis-agreement :-(

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
There are three ways to get something done: (1) Do it yourself.
(2) Hire someone to do it for you. (3) Forbid your kids to do
it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,298
Messages
2,571,542
Members
48,284
Latest member
RedaBruno6

Latest Threads

Top