Hello, every time I enable ssh after having disabled it (via the GUI), it seems /run/sshd directory is missing so I have to try enabling ssh twice before it works without an error. This occurs every time I disable then re enable it rather than it being a random occurrence like a similar issue in another thread turned out to be. Failure occurs for user
test_sshd_config when executing sshd -t.
Please see the error below. I've removed other user's sections in the error message to make it fit. I've tried researching this but the details and possible fixes are a bit over my head. Thank you in advance.
Code
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color ssh 2>&1' with exit code '1': debian:
----------
ID: disable_ssh_socket_activation
Function: service.dead
Name: ssh.socket
Result: True
Comment: The service ssh.socket is already dead
Started: 11:25:01.623439
Duration: 83.792 ms
Changes:
----------
ID: remove_ssh_authorized_keys
Function: file.directory
Name: /var/lib/openmediavault/ssh/authorized_keys
Result: True
Comment: Files cleaned from directory /var/lib/openmediavault/ssh/authorized_keys
Started: 11:25:01.713675
Duration: 6.378 ms
Changes:
----------
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
removed:
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
----------
ID: configure_sshd_config
Function: file.managed
Name: /etc/ssh/sshd_config
Result: True
Comment: File /etc/ssh/sshd_config is in the correct state
Started: 11:25:01.731524
Duration: 163.101 ms
Changes:
----------
ID: divert_sshd_config
Function: omv_dpkg.divert_add
Name: /etc/ssh/sshd_config
Result: True
Comment: Leaving 'local diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distrib'
Started: 11:25:01.895177
Duration: 16.32 ms
Changes:
----------
ID: test_sshd_config
Function: cmd.run
Name: sshd -t
Result: False
Comment: Command "sshd -t" run
Started: 11:25:01.914150
Duration: 19.155 ms
Changes:
----------
pid:
57218
retcode:
255
stderr:
Missing privilege separation directory: /run/sshd
stdout:
----------
ID: start_ssh_service
Function: service.running
Name: ssh
Result: True
Comment: Service ssh has been enabled, and is running
Started: 11:25:01.934086
Duration: 1173.462 ms
Changes:
----------
ssh:
True
Summary for debian
------------
Succeeded: 8 (changed=6)
Failed: 1
------------
Total states run: 9
Total run time: 1.473 s
[ERROR ] Command 'sshd' failed with return code: 255
[ERROR ] stderr: Missing privilege separation directory: /run/sshd
[ERROR ] retcode: 255
[ERROR ] {'pid': 57218, 'retcode': 255, 'stdout': '', 'stderr': 'Missing privilege separation directory: /run/sshd'}
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color ssh 2>&1' with exit code '1': debian:
----------
ID: disable_ssh_socket_activation
Function: service.dead
Name: ssh.socket
Result: True
Comment: The service ssh.socket is already dead
Started: 11:25:01.623439
Duration: 83.792 ms
Changes:
----------
ID: remove_ssh_authorized_keys
Function: file.directory
Name: /var/lib/openmediavault/ssh/authorized_keys
Result: True
Comment: Files cleaned from directory /var/lib/openmediavault/ssh/authorized_keys
Started: 11:25:01.713675
Duration: 6.378 ms
Changes:
----------
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
/var/lib/openmediavault/ssh/authorized_keys/[REDACTED]:
----------
removed:
Removed due to clean
removed:
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
- /var/lib/openmediavault/ssh/authorized_keys/[REDACTED]
----------
ID: configure_sshd_config
Function: file.managed
Name: /etc/ssh/sshd_config
Result: True
Comment: File /etc/ssh/sshd_config is in the correct state
Started: 11:25:01.731524
Duration: 163.101 ms
Changes:
----------
ID: divert_sshd_config
Function: omv_dpkg.divert_add
Name: /etc/ssh/sshd_config
Result: True
Comment: Leaving 'local diversion of /etc/ssh/sshd_config to /etc/ssh/sshd_config.distrib'
Started: 11:25:01.895177
Duration: 16.32 ms
Changes:
----------
ID: test_sshd_config
Function: cmd.run
Name: sshd -t
Result: False
Comment: Command "sshd -t" run
Started: 11:25:01.914150
Duration: 19.155 ms
Changes:
----------
pid:
57218
retcode:
255
stderr:
Missing privilege separation directory: /run/sshd
stdout:
----------
ID: start_ssh_service
Function: service.running
Name: ssh
Result: True
Comment: Service ssh has been enabled, and is running
Started: 11:25:01.934086
Duration: 1173.462 ms
Changes:
----------
ssh:
True
Summary for debian
------------
Succeeded: 8 (changed=6)
Failed: 1
------------
Total states run: 9
Total run time: 1.473 s
[ERROR ] Command 'sshd' failed with return code: 255
[ERROR ] stderr: Missing privilege separation directory: /run/sshd
[ERROR ] retcode: 255
[ERROR ] {'pid': 57218, 'retcode': 255, 'stdout': '', 'stderr': 'Missing privilege separation directory: /run/sshd'} in /usr/share/php/openmediavault/system/process.inc:242
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(62): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(178): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(620): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatus07...', '/tmp/bgoutputda...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(199): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}
Alles anzeigen