Re: Control stdin/stdout of an other program.. How can I do that ?
- From: Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Sep 2007 13:10:01 +0200
Benoit Lefebvre <benoit.lefebvre@xxxxxxxxx> writes:
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
I think ssh-agent is designed to do what you want.
http://linuxmafia.com/pub/os2/stahl-ssh/snafu-mirror/ssh-agent.html
--
__Pascal Bourguignon__ http://www.informatimago.com/
.
- References:
- Control stdin/stdout of an other program.. How can I do that ?
- From: Benoit Lefebvre
- Control stdin/stdout of an other program.. How can I do that ?
- Prev by Date: directio write on linux 2.4.6
- Next by Date: Re: directio write on linux 2.4.6
- Previous by thread: Re: Control stdin/stdout of an other program.. How can I do that ?
- Next by thread: Receiving UDP Broadcasts on Solaris 9, 10
- Index(es):