in reply to Re: IO::Pty, Net::Telnet and SSH
in thread IO::Pty, Net::Telnet and SSH [SOLVED]
Hi,
I had been using Net::SSH::Perl successfully. The problem came when I needed to run some interactive programs on the remote servers and needed Expect to interact with them. Since Expect can either spawn a new program or work with an open filehandle, I thought I'd find a way to open a SSH or Telnet connection to a server, do the login work then let Expect takeover when an interactive script had to be executed on the remote side.
I'm thinking what I could do is spawn SSH directly from Expect. The thing is I don't *always* need to run interactive scripts on the remote side, hence why I don't *always* need to use Expect. This is why I thought it would be neater to have Net::Telnet open the Telnet or SSH connection (depending on server) then run Expect when I need to.
I'm open to suggestions, if you have another way in mind of how I can achieve this (preferably non-hackish way as the idea is that the code is maintainable afterwards)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: IO::Pty, Net::Telnet and SSH
by fmerges (Chaplain) on Nov 04, 2006 at 16:40 UTC | |
by gonza (Novice) on Nov 04, 2006 at 17:45 UTC | |
by fmerges (Chaplain) on Nov 04, 2006 at 18:44 UTC | |
by gonza (Novice) on Nov 04, 2006 at 19:45 UTC |