can't exec ssh in popen()
From: sam (sam.wun_at_authtec.com)
Date: 01/24/05
- Previous message: John Hanley: "Linux on IPAQ"
- Next in thread: Larry I Smith: "Re: can't exec ssh in popen()"
- Reply: Larry I Smith: "Re: can't exec ssh in popen()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Jan 2005 00:51:40 +0800
Hi,
I don't know why the following popen does not allow me login ssh:
#include <stdio.h>
main()
{
FILE *p;
p = popen("/usr/bin/ssh", "r");
fprintf(p, "sam@dot.com\n");
fprintf(p, "mypasswd\n");
pclose(p);
}
# ./a.out
usage: ssh [-1246AaCfghkNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D port] [-e escape_char] [-F configfile] [-i identity_file]
[-L port:host:hostport] [-l login_name] [-m mac_spec] [-o
option]
[-p port] [-R port:host:hostport] [user@]hostname [command]
How can I correct this coding error?
Thanks
Sam
- Previous message: John Hanley: "Linux on IPAQ"
- Next in thread: Larry I Smith: "Re: can't exec ssh in popen()"
- Reply: Larry I Smith: "Re: can't exec ssh in popen()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]