group = portforwarder
instances = 10
server = /usr/bin/ssh
- server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -C @@TARGET_HOST@@ : nothing
+ server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -C @@TARGET_HOST@@ forward-to @@TARGET_PORT@@
cps = 0 0
}
'
target_host = service['target_host']
local_bind = service['source_bind_port']
- lines << "# from #{sourcehost} on local port #{service['source_bind_port']}"
+ 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?
lines << "# insufficient config values"
else
p = template.clone
p.gsub!('@@TARGET_HOST@@', target_host)
- p.gsub!('@@TARGET_PORT@@', target_port)
- p.gsub!('@@LOCLA_BIND@@', local_bind)
+ p.gsub!('@@TARGET_PORT@@', target_port.to_s)
+ p.gsub!('@@LOCAL_BIND@@', local_bind.to_s)
lines << p
end
end