Control stdin/stdout of an other program.. How can I do that ?
- From: Benoit Lefebvre <benoit.lefebvre@xxxxxxxxx>
- Date: Fri, 14 Sep 2007 11:31:56 -0700
Hi,
I know that ssh keys exists.. I know about ssh_agent and all these
things..
But I'm limited in my environment and I won't be able to change
these things to put an ssh key everywhere.
What I want to do is connect to a list of servers via ssh (OpenSSH)
and only get prompted for the password once (assuming the password is
the same for all the servers).
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.
PS: I'm planning on developping in c/c++ on an AIX 5L environment
Thanks,
--Benoit Lefebvre
.
- Follow-Ups:
- Re: Control stdin/stdout of an other program.. How can I do that ?
- From: Pascal Bourguignon
- Re: Control stdin/stdout of an other program.. How can I do that ?
- From: Gordon Burditt
- Re: Control stdin/stdout of an other program.. How can I do that ?
- From: Maxim Yegorushkin
- Re: Control stdin/stdout of an other program.. How can I do that ?
- Prev by Date: Re: strtok and strtok_r
- Next by Date: Re: strtok and strtok_r
- Previous by thread: DW_FORM_strp pointing outside of .debug_str section
- Next by thread: Re: Control stdin/stdout of an other program.. How can I do that ?
- Index(es):