Field for PubkeyAuthentication
authorJamie Cameron <jcameron@webmin.com>
Wed, 12 Nov 2008 00:05:28 +0000 (00:05 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 12 Nov 2008 00:05:28 +0000 (00:05 +0000)
sshd/CHANGELOG
sshd/edit_users.cgi
sshd/lang/en
sshd/save_users.cgi

index b5ab75f..a43fcd3 100644 (file)
@@ -9,3 +9,5 @@ Added support for systems that don't have an SSH server PID file (like OS X).
 Added a Module Config option to set the SSH server version, rather than having Webmin auto-detect it.
 ---- Changes since 1.430 ----
 Added a button on the module's main page for viewing the public side of the host keys, thanks to Sean Cox.
+---- Changes since 1.440 ----
+Added a field to allow or deny SSH 2 public key authentication.
index 069b242..b85abd9 100755 (executable)
@@ -126,6 +126,7 @@ else {
 print "</select></td>\n";
 &ecmd();
 
+# SSH 1 RSA authentication
 if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
        &scmd();
        $rsa = &find_value("RSAAuthentication", $conf);
@@ -137,6 +138,18 @@ if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
        &ecmd();
        }
 
+# SSH 2 DSA authentication
+if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
+       &scmd();
+       $rsa = &find_value("PubkeyAuthentication", $conf);
+       print "<td><b>$text{'users_dsa'}</b></td> <td nowrap>\n";
+       printf "<input type=radio name=dsa value=1 %s> %s\n",
+               lc($rsa) eq 'no' ? "" : "checked", $text{'yes'};
+       printf "<input type=radio name=dsa value=0 %s> %s</td>\n",
+               lc($rsa) eq 'no' ? "checked" : "", $text{'no'};
+       &ecmd();
+       }
+
 &scmd();
 $strict = &find_value("StrictModes", $conf);
 print "<td><b>$text{'users_strict'}</b></td> <td nowrap>\n";
index 91e83f9..5140ab9 100644 (file)
@@ -34,7 +34,8 @@ users_pempty=Permit logins with empty passwords?
 users_root=Allow login by root?
 users_nopwd=Only with RSA auth
 users_fcmd=Only for commands
-users_rsa=Allow RSA authentication?
+users_rsa=Allow RSA (SSH 1) authentication?
+users_dsa=Allow DSA (SSH 2) authentication?
 users_strict=Check permissions on key files?
 users_rhosts=Ignore <tt>.rhosts</tt> files?
 users_rrhosts=Ignore <tt>.rhosts</tt> files for root user?
index 30bb2bd..8164e93 100755 (executable)
@@ -50,6 +50,10 @@ if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
 if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
        &save_directive("RSAAuthentication", $conf, $in{'rsa'} ? 'yes' : 'no');
        }
+if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
+       &save_directive("PubkeyAuthentication", $conf,
+                       $in{'dsa'} ? 'yes' : 'no');
+       }
 
 &save_directive("StrictModes", $conf, $in{'strict'} ? 'yes' : 'no');