#607884 autossh: does not support "--" style quoting for its own -f parameter, works for -V and -M

Package:
autossh
Source:
autossh
Description:
Automatically restart SSH sessions and tunnels
Submitter:
Axel Beckert
Date:
2010-12-24 15:09:05 UTC
Severity:
minor
#607884#5
Date:
2010-12-23 16:20:53 UTC
From:
To:
You'll get quite strange results when using "--" to quote following
options (work's in ssh), but only if the first letter (but not
necessarily the second character) in the option is "f".

$ autossh host -- echo --follow-all
--ollow-all
$ autossh host -- echo -fa
-a
$ ssh host -- echo --follow-all
--follow-all
$ ssh host -- echo -fa
-fa
$

Workarounds: Add a second "f" or quote the whole command:

$ autossh host -- echo --ffollow-all
--follow-all
$ autossh host 'echo --follow-all'
--follow-all
$

Interestingly this only happens with the -f parameter. "--" style
quoting works fine with -V and -M:

$ autossh host echo -V
autossh 1.4b
$ autossh host -- echo -V
-V
$

The bug also does not happen if "-f" comes later in the string, only if
it's the first letter:

$ autossh host -- echo --bla-fasel
--bla-fasel
$ autossh host -- echo -------------------follow-all
-------------------ollow-all
$

P.S. to Filippo: Will contact upstream soon about this. I'm just in a
little hurry at the moment but wanted this to be documented. :-)