Lazy evaluation of exec clause in ssh Match statement

Iain Morgan imorgan at nas.nasa.gov
Thu Oct 31 06:02:03 EST 2013


Hello,

At present, if a ssh Match block contains an exec clause, the specified
command is executed regardless of whether any preceding clauses are
true. Thus,

	Match host !*.* exec "some_command %h"
		...

would always execute some_command regardless of whether the host matches
the preceding pattern. That seems undesirable, particularly as the
user-specified command may do name lookups or other operations that may
introduce delays.

Using a lazy approach, where the command is only executed if the
preceding clauses are true would seem to be better.

-- 
Iain Morgan


More information about the openssh-unix-dev mailing list