]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
disable autossh control port
authorAntoine Beaupré <anarcat@koumbit.org>
Thu, 18 Jun 2015 21:01:01 +0000 (17:01 -0400)
committerAntoine Beaupré <anarcat@koumbit.org>
Thu, 18 Jun 2015 21:15:28 +0000 (17:15 -0400)
this is important to make it easier to guess the ssh port from the
central server.

we rely on ServerAliveInterval instead to reconnect when we lose the
server.

this was unintentionally removed in november 2012 in the isuma-autossh
package, saying it was "not supported everywhere" and due to some
confusion about the defaults (defaults are to *enable* the port). see
commit ec0ebdd9533a29ee4f62f9fbb84ee9e80219ef84 in there.

manifests/autossh.pp

index 1ded7eb914ba2b8e3e062bf82771507566f2dd74..5650584a490c6205fb4f8b1fcbcc2d0e039b5372 100644 (file)
@@ -23,7 +23,7 @@ class sshd::autossh($host,
       source => 'puppet:///modules/sshd/autossh.init.d';
     '/etc/default/autossh':
       mode    => '0444',
-      content => "USER=$user\nPIDFILE=$pidfile\nDAEMON_ARGS='-f -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n";
+      content => "USER=$user\nPIDFILE=$pidfile\nDAEMON_ARGS='-M0 -f -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n";
   }
   package { 'autossh':
     ensure => present,