From: Austin S. <te...@of...> - 2002-03-03 02:53:19
|
> > But for an ssh or Kerberized telnet session, that won't work - telnet or > ssh has to stay running to encrypt/decrypt the data - the only way to > talk to the remote router is via the pty of ssh/telnet. I could have > the perl/expect program start ssh/telnet, but my program is meant to be > a tool that you run multiple times against the router, so I want the ssh/ > telnet to persist. > > > Another way is to have an expect script that does interact() at > > some point and uses named pipes as i/o. I think that's how things like > > kibitz work. Performance-wise it's less efficient, but probably easier to > > code. > > Easy to code, I like that :-). I had earlier tried using ksh93, > which has a built-in for doing this - when you > start a process and background it with "|&" instead of "&", you > end up with two pipes (meant for use with ksh's "read -p" and "print -p" > commands). I suppose I can try hooking one of the pipes to the Expect > object, and teaching my script to send the output data for the telnet/ssh > session to the other? Something like that would probably be my approach. Austin |