http://www.perlmonks.org?node_id=353457


in reply to Passing client information between multiple sockets...

This comes up all the time on the expect.pm list. Since you have AIX, put SSH on the database box, then use the expect.pm perl module to spawn an slogin to it from the linux box. Expect.pm can then handle all of the output and response stuff pretty easily. The reason I say use ssh instead of telnet is that automating telnet requires that you save an unecrypted password somewhere. This is a bad idea.
  • Comment on Re: Passing client information between multiple sockets...

Replies are listed 'Best First'.
Re: Re: Passing client information between multiple sockets...
by Plankton (Vicar) on May 14, 2004 at 23:47 UTC
    Are you suggestion that he have Expect enter the password to ssh/slogin? Were does Expect store the password? Does it store it encrypted manner? The only thing I can think of would be to use ssh Public Key Authenication and avoid having to enter a password all together thus removing the need for Expect.

    Plankton: 1% Evil, 99% Hot Gas.
      I think Expect will be used for more than just automating the login; it'll also interact with the db shell.
        I don't disagree with you there, but a even a shell script can interact with the db shell. Example ...
        #/bin/sh ssh user@db_server sqlplus /nolog <<EOT connect user passwd select * from whatever where something = $1; EOT
        Also how is Expect going to proctect the login password?

        Plankton: 1% Evil, 99% Hot Gas.