openssh continues to process dash arguements after hostname

Christian Vogel chris at obelix.hedonism.cx
Fri Apr 30 21:07:10 EST 2004


Hi,

On Fri, Apr 30, 2004 at 05:17:48PM +1000, Damien Miller wrote:
> Does anyone who is asking for the command line processing to be changed
> actually have a need to execute "-l user" (or whatever) on a remote
> system?

at least Linux (Red Hat 7.0, glibc 2.2.4-18.7.0.8) getopt()
stops parsing options after it encounters the string "--", so you
could do "ssh host -- -l foo" to execute -l foo.

Nevertheless, on my system /bin/sh complains about "-l", so it might
be wiser to do "ssh host /bin/env -- -l foo", or to specify the path
to "-l" in the first place.

	Chris

-- 
The Tao that is seen
Is not the true Tao, until
You bring fresh toner.
-- Bill Torcaso




More information about the openssh-unix-dev mailing list