summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cf/conf/config.xml1
-rw-r--r--conf.default/config.xml1
-rwxr-xr-xetc/sshd3
-rwxr-xr-xusr/local/www/system_advanced.php27
4 files changed, 31 insertions, 1 deletions
diff --git a/cf/conf/config.xml b/cf/conf/config.xml
index 8bb1b03..a17cc8d 100644
--- a/cf/conf/config.xml
+++ b/cf/conf/config.xml
@@ -5,6 +5,7 @@
<lastchange></lastchange>
<theme>metallic</theme>
<system>
+ <enablesshd/>
<optimization>normal</optimization>
<schedulertype>priq</schedulertype>
<hostname>pfSense</hostname>
diff --git a/conf.default/config.xml b/conf.default/config.xml
index 5c773d1..07510c0 100644
--- a/conf.default/config.xml
+++ b/conf.default/config.xml
@@ -5,6 +5,7 @@
<lastchange></lastchange>
<theme>metallic</theme>
<system>
+ <enablesshd/>
<optimization>normal</optimization>
<schedulertype>priq</schedulertype>
<hostname>pfSense</hostname>
diff --git a/etc/sshd b/etc/sshd
index bb67d95..4a5c71c 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -32,6 +32,9 @@
$stderr = fopen("php://stderr", "w");
+ if(!isset($config['sshenabled']))
+ exit;
+
function file_size($file) {
$size = filesize($file);
return $size;
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php
index 117fb43..f7e4fe8 100755
--- a/usr/local/www/system_advanced.php
+++ b/usr/local/www/system_advanced.php
@@ -52,6 +52,7 @@ $pconfig['disablerendevouz'] = $config['system']['disablerendevouz'];
$pconfig['enableserial'] = $config['system']['enableserial'];
$pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck']);
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
+$pconfig['sshenabled'] = $config['system']['sshenabled'];
if ($_POST) {
@@ -90,6 +91,11 @@ if ($_POST) {
} else {
unset($config['system']['disablefilter']);
}
+ if($_POST['sshenabled'] == "yes") {
+ $config['system']['sshenabled'] = "enabled";
+ } else {
+ unset($config['system']['sshenabled']);
+ }
if($_POST['disableftpproxy'] == "yes") {
$config['system']['disableftpproxy'] = "enabled";
unset($config['system']['rfc959workaround']);
@@ -272,7 +278,26 @@ function openwindow(url) {
</tr>
<?php endif ?>
-
+ <tr>
+ <td colspan="2" valign="top" class="listtopic">Secure Shell</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">&nbsp;</td>
+ <td width="78%" class="vtable">
+ <input name="sshenable" type="checkbox" id="sshenable" value="yes" <?php if (isset($pconfig['sshenable'])) echo "checked"; ?> onclick="enable_change(false)">
+ <strong>This controls if SSH is enabled</strong>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ </td>
+ </tr>
+ </tr>
+ <tr>
+ <td colspan="2" class="list" height="12"></td>
+ </tr>
<tr>
<td colspan="2" valign="top" class="listtopic">Theme</td>
OpenPOWER on IntegriCloud