<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>system funtion or fork or exec</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi I am new in the linux world.&nbsp; I've been trying to execute</FONT>

<BR><FONT SIZE=2 FACE="Arial">the system function to execute the following code:</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">&nbsp; uid = geteuid();</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; return_value = system(&quot;ssh -N -f -L 7050:rmyserver:6565 myUser@myserver\n&quot;);</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; return return_value;</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">The code works fine.&nbsp; The problem with this is that I need to type my password to authenticate.&nbsp; If everything goes well</FONT></P>

<P><FONT SIZE=2 FACE="Arial">then I have a ssh tunnel with port 7050 listening from 6565 from myserver.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I would like to know how can you append the password to return_value so that I dont have to type</FONT>

<BR><FONT SIZE=2 FACE="Arial">the password, since this routine has to be automatic.</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Please advice if there is any other better form to do it...or how append the password (of course that is not too secure)</FONT></P>
<BR>

<P><FONT SIZE=2 FACE="Arial">thanks</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">gman</FONT>
</P>

</BODY>
</HTML>