X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fportforwarder%2Ftemplates%2Fxinetd.erb;h=7ff0dfb0d39df2a56bc62d6be8721e8bd12ae4b7;hb=215a052cae9e4e1862c9ce67461ae4091d95371d;hp=2d8b99441b1a776d4ac82e809876de853029cb60;hpb=84450c91002bfcadc2cad7b06c49804f3ce3772a;p=mirror%2Fdsa-puppet.git diff --git a/modules/portforwarder/templates/xinetd.erb b/modules/portforwarder/templates/xinetd.erb index 2d8b99441..7ff0dfb0d 100644 --- a/modules/portforwarder/templates/xinetd.erb +++ b/modules/portforwarder/templates/xinetd.erb @@ -19,7 +19,7 @@ template = 'service @@TARGET_HOST@@@@TARGET_PORT@@ group = portforwarder instances = 10 server = /usr/bin/ssh - server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -C @@TARGET_HOST@@ forward-to @@TARGET_PORT@@ + server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -o BatchMode=yes -C @@SSH_OPTIONS@@ @@TARGET_HOST@@ forward-to @@TARGET_PORT@@ cps = 0 0 } ' @@ -30,6 +30,7 @@ if config[fqdn] target_port = service['target_port'] target_host = service['target_host'] local_bind = service['source_bind_port'] + ssh_options = service['ssh_options'] || "" lines << "# to #{target_port.to_s}:target_host from local port #{local_bind.to_s}" if target_port.nil? or target_host.nil? or local_bind.nil? @@ -39,6 +40,7 @@ if config[fqdn] p.gsub!('@@TARGET_HOST@@', target_host) p.gsub!('@@TARGET_PORT@@', target_port.to_s) p.gsub!('@@LOCAL_BIND@@', local_bind.to_s) + p.gsub!('@@SSH_OPTIONS@@', ssh_options.to_s) lines << p end end