QProcess && ssh && write password

Hi all,
I need to star an ssh session from my application to a remote server.
I start the session with a QProcess.
The executed command is something like:
@
ssh -R 59000:localhost:5900 remote.server.com -f -N
@
but after I execute it, I must pass the password.

First of all, I would expect that ssh checks if its stdin is connected to an interactive terminal and only then ask for a password. Usually command line tools check of presence of a tty using the stty(2) syscall. And you can't expect to much of QProcess, for sure it won't support terminals. That said, check the documentation, it clearly states, that QProcess is a QIoDevice and you can write to stdin of your child process simply by calling QIoDevice::write(). Before writing ensure the process image is loaded already by calling QProcess::waitForStarted().

[quote author="Frank" date="1297876571"]Both for improved security and improved convenience, I would use private/public key authentication.[/quote]

My application must works in a pc and in a BeagleBoard so I'd like to use a simple solution also if less secure.
[/quote]

Shipping a couple of public/private keys is VERY simple (it's just a matter of putting two files in the right place). You may also evaluate expect(1) or, if under unix with a X11 environment, create a simple SSH_ASKPASS program.