[LCP]system funtion or fork or exec
Gonzalo Sanchez
Gsanchez at roinetwork.com
Fri Feb 7 22:32:01 UTC 2003
Hi I am new in the linux world. I've been trying to execute
the system function to execute the following code:
uid = geteuid();
return_value = system("ssh -N -f -L 7050:rmyserver:6565 myUser at myserver\n");
return return_value;
The code works fine. The problem with this is that I need to type my password to authenticate. If everything goes well
then I have a ssh tunnel with port 7050 listening from 6565 from myserver.
I would like to know how can you append the password to return_value so that I dont have to type
the password, since this routine has to be automatic.
Please advice if there is any other better form to do it...or how append the password (of course that is not too secure)
thanks
gman
-----Original Message-----
From: Greg Black [mailto:gjb at gbch.net]
Sent: Thursday, February 06, 2003 7:08 PM
To: linuxcprogramming at lists.linux.org.au
Subject: Re: [LCP]system funtion or fork or exec
"Gonzalo Sanchez" wrote:
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
| [...]
|
| <P><FONT SIZE=3D2 FACE=3D"Arial">Hi I am new in the linux world. =
The first thing you'll need to learn is how to send messages out
in text/plain format. The people will be able and willing to
read them and possibly to answer your questions.
Greg
_______________________________________________
This is the Linux C Programming List
: http://lists.linux.org.au/listinfo/linuxcprogramming List
More information about the linuxCprogramming
mailing list