Running the executable in another process without creating a new process
I want to write a program that launches an executable image without creating a new process ... I want to do this because I want to use plinks that send the password to the remote ssh server ...
The plink program sends the password provided on the command line. If I use fork and exec functions, someone can see the password provided on the command line using process explorer or ps -aef or cat / proc // cmdline. How to avoid this security hole ... and this program should run on both Linux and windows.
source to share
Configure your SSH server to use RSA public and private key authentication instead of passwords. This is usually the best choice for SSH in general. See http://www.google.com/search?q=set+up+ssh+rsa .
source to share
I discovered a plink wrapper for unison that does what you want, basically waits for the plink STDOUT for a password and then feeds its response to STDIN.
Hope this works for you.
source to share