in reply to Making a shell work like a Net::Telnet session

So now, the powers that be have declared that Telnet shall no longer be an option on these unix servers

Their concern is surely unencrypted communication over the wire. Could you convince them to still run the telnet server, but only accept connections from localhost? That addresses their concern, and opens the simple solution of creating a ssh tunnel using putty or whatever.

+--------------------+ +--------------------+ | | | | | +--------+ | | +--------+ | | | Perl | | | | Telnet | | | | script | | | | server | | | +--------+ | | +--------+ | | | | | ^ | | v | | | | | +--------+ | | +--------+ | | | Tunnel |~~~~~~~~~~~~~~>| Tunnel | | | +--------+ | | +--------+ | | | | | +--------------------+ +--------------------+ ~ = encrypted

Try as we did, we could not get the necessary modules to install on our antiquated equipment

It's not clear to me which machine can and can't do what. I would also like to know their OS. (Don't need specifics; Windows vs unix should do.)

Replies are listed 'Best First'.
Re^2: Making a shell work like a Net::Telnet session
by pbwiz1970 (Initiate) on Feb 09, 2011 at 22:45 UTC

    The solution needs to run on Windows 2000 and Windows 2003 server. That server currently opens a telnet session to a solaris server that then connects to remote devices via SSH.

    So, basically, I want to capture a shell session the same way that I capture a telnet session today. Inside that session, I use plink to ssh to my solaris server, then it SSH's to the devices.

      It's unfortunate that you didn't clear up which machine can and can't do what. I'm guessing now that you were saying you couldn't get Net::SSH::Perl installed on the Windows machine.

      Instead, you made it less clear by saying the solution must run on Windows. Does that mean you want to take Solaris out of the solution?

      And you didn't comment at all on the solution I proposed.

        Sorry, I thought I did. Anyway.

        There are two servers running the application. One of them is a Windows 2000 server, the other is a Windows 2003 server. These are capable of running the Net::Telnet module, and use that for all of their access and parsing.

        They can run ssh using plink.

        The solaris server is simply being used in this case as an SSH helper. Because I could not get SSH working on the two windows servers in a timely fashion, I opened a telnet session to the solaris server, and issued commands to open SSH sessions from the Solaris server. This has the effect of letting all of my parsing code use the Net::Telnet functions, without having to also recode all of them to use Net::SSH::Perl, or perhaps Net::SSH::W32perl

        I will eventually take the Solaris server out of the equation, once I get the SSH modules working on the windows platforms. Until then, I was hoping for a faster temporary solution.

        Also, I have not been able to get permission to allow the windows boxes to have an exception to the requirement to use SSH only on the solaris server.

        Thanks again for any help you might provide