diff --git a/src/etc/inc/filter.lib.inc b/src/etc/inc/filter.lib.inc index fdcc3ce5d..8082d3f1e 100644 --- a/src/etc/inc/filter.lib.inc +++ b/src/etc/inc/filter.lib.inc @@ -70,7 +70,8 @@ function filter_core_antilockout_ports() if ($config['system']['webgui']['protocol'] == "https" && !isset($config['system']['webgui']['disablehttpredirect'])) { $lockout_ports[] = "80"; } - if (isset($config['system']['ssh']['enabled']) || (!isset($config['system']['ssh']) && is_install_media())) { + if (isset($config['system']['ssh']['enabled']) || + (is_install_media() && !isset($config['system']['ssh']) && is_process_running('sshd'))) { $lockout_ports[] = empty($config['system']['ssh']['port']) ? "22" : $config['system']['ssh']['port']; } } diff --git a/src/etc/rc.livemode b/src/etc/rc.livemode index 38b5f3b22..9e7da92cb 100755 --- a/src/etc/rc.livemode +++ b/src/etc/rc.livemode @@ -31,7 +31,7 @@ require_once('config.inc'); require_once('auth.inc'); require_once('util.inc'); -if (!isset($config['system']['ssh']) && is_install_media()) { +if (is_install_media()) { /* * Installer mode requires setting up an extra user and * we will protect it with root's password. We can only @@ -57,8 +57,14 @@ if (!isset($config['system']['ssh']) && is_install_media()) { local_user_set($root, true); echo "\n"; - echo "Welcome! Both `root' and `installer' users are availabe for system\n"; - echo "setup or invoking the installer, respectively. The predefined root\n"; - echo "password works for both accounts. Remote login via SSH is possible.\n"; + + if (!isset($config['system']['ssh']) && is_process_running('sshd')) { + echo "Welcome! Both `root' and `installer' users are availabe for system\n"; + echo "setup or invoking the installer, respectively. The predefined root\n"; + echo "password works for both accounts. Remote login via SSH is possible.\n"; + } else { + echo "Welcome! Both `root' and `installer' users are availabe for system\n"; + echo "setup. The predefined root password works for both accounts.\n"; + } } } diff --git a/src/www/guiconfig.inc b/src/www/guiconfig.inc index b7bd57783..468a6bfe1 100644 --- a/src/www/guiconfig.inc +++ b/src/www/guiconfig.inc @@ -252,7 +252,8 @@ function print_service_banner($service) } print_alert_box( gettext('You are currently running in LiveCD mode. A reboot will reset the configuration.') .' ' . - (is_process_running('sshd') ? gettext('SSH remote login is enabled for the users "root" and ' . + (!isset($config['system']['ssh']) && is_process_running('sshd') ? + gettext('SSH remote login is enabled for the users "root" and ' . '"installer" using the same password.') : gettext('SSH remote login is disabled.')) ); default: