Re: Control stdin/stdout of an other program.. How can I do that ?



On Sep 14, 7:31 pm, Benoit Lefebvre <benoit.lefeb...@xxxxxxxxx> wrote:

[]

I would like my program to start ssh, get the "password:" prompt and
then issue the password. Once this is done, leave the session to me.
Like if I could send keys to a system() call.
Actually, this thing will be used to issue commands to many servers
at the same time to do basic administration.. like creating a user on
many systems.

I've seen in the past some softwares reading/writing to the passwd
command.. for example P-Synch from MTechIT.. the problem is that I
haven't seen the source code and I'm having problems finding what I am
looking for with the stdin/stdout/read/write keywords..

Anyone can refer me to an open source application that do soemthing
similar or a basic script example.

Have you seen this: http://en.wikipedia.org/wiki/Expect

.



Relevant Pages

  • Re: Wonderfull ASCII<->BIN-converter; sdcard.zip from James M. P.
    ... between source code and compiled object could be useful for other ... "Kermit ASCII" style source code string for transferring with the ... differs, drop in a replacement for the 49 series' SREPL command, ... and work around any other 49 series commands that aren't available ...
    (comp.sys.hp48)
  • Re: Few Good Interview Questions
    ... fashion. ... I well remember one new guy on our VMS machines being a clever sod ... should have source code' and put it in CVS 'where it should be'. ... Thing is he knew all the commands but had no idea about thinking things ...
    (comp.unix.solaris)
  • SWIG problems - "ImportError: dynamic module does not define......."
    ... GCC 3.2.3 and SWIG 1.3.19, ... compiled from source code. ... the following commands: ... dynamic module does not define init function" when I ...
    (comp.lang.python)
  • Re: Sement fault
    ... > %someletter that many put after the commands? ... have to download/install the source code and wander through it looking ... or reading the code to find out what it does. ... Open standards. ...
    (alt.os.linux.suse)
  • Use_Pty does not work on SSH2
    ... package to login to the SSH server on Solaris 8 and execute commands ... I can login to the system and execute basic ... I, then, search the source code of the Net::SSH::Perl package ... Under the cmd function in SSH2.pm (sub cmd), ...
    (comp.security.ssh)