From: Todd on
On 03/09/2010 06:48 AM, Chris Davies wrote:
> Todd<todd(a)invalid.com> wrote:
>> RunFirefox () {
>> tmp=`ssh -l todd -t -X 192.168.255.185 /usr/bin/firefox \
>> --no-remote"<< -EOF
>> $Password
>> EOF`
>> return $?
>> }
>
> 1. I thought you said you were running in a secure environment?
> 2. If this is what you're trying to do, go back to take a look at the
> -f flag which I recommended to you a few posts back
>
> Chris

Hi Chris,


-f Requests ssh to go to background just before command
execution. This is useful if ssh is going to ask
for passwords or passphrases, but the user wants it
in the background.

I presume that "-f" is the same thing as a local "bg" or "&"
background command. Especially if it is going to ask me for
a password. How does one enter a password, if it is in the background?
Why would I want to run this in the background
anyway?

What am I missing?

-T
From: Chris Davies on
Todd <todd(a)invalid.com> wrote:
> -f Requests ssh to go to background just before command
> execution. This is useful if ssh is going to ask
> for passwords or passphrases, but the user wants it
> in the background.

> I presume that "-f" is the same thing as a local "bg" or "&"
> background command.

No, it's not the same at all. (Re-read the second sentence that you've
quoted, above.)


> Especially if it is going to ask me for a password. How does one enter
> a password, if it is in the background?

It isn't in the background when it asks for a password. Once it has
established the connection - including any password/token negotiation -
and is about to fire off the command, it backgrounds itself.


> Why would I want to run this in the background anyway?

Because that appears to be what you're trying to achieve.
Chris