web-dev-qa-db-ja.com

Debian10「バスター」でのアップデート中にSshdをポート2222にバインド中にエラーが発生しました

更新中の次のエラー出力:

Errors were encountered while processing: openssh-server ssh E: Sub-process /usr/bin/dpkg returned an error code (1) Setting up openssh-server (1:7.9p1-10+deb10u1) ... rescue-ssh.target is a disabled or a static unit, not starting it. Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. invoke-rc.d: initscript ssh, action "restart" failed. ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2019-10-14 12:57:57 -03; 7ms agoDocs: man:sshd(8) man:sshd_config(5) Process: 22241 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS) Process: 22242 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255/EXCEPTION) Main PID: 22242 (code=exited, status=255/EXCEPTION)

Oct 14 12:57:57 wdbuster systemd[1]: Starting OpenBSD Secure Shell server... Oct 14 12:57:57 wdbuster sshd[22242]: error: Bind to port 2222 on 0.0.0.0 failed: Address already in use. dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of ssh: ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however: Package openssh-server is not configured yet.

dpkg: error processing package ssh (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: openssh-server ssh Press Return to continue, 'q' followed by Return to quit.

次に、_$ Sudo dpkg --audit_は次の出力を返しました。

The following packages have been unpacked but not yet configured. They must be configured using dpkg --configure or the configure menu option in dselect for them to work: ssh secure Shell client and server (metapackage)

The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect: openssh-server secure Shell (SSH) server, for secure access from remote

また、ポート22が_/etc/ssh/sshd_config_で2222に変更されていることを考慮してください。

何か案は?

4
Vascon63

次のように進めることができます:

$ Sudo systemctl disable sshd $ Sudo systemctl daemon-reload $ Sudo dpkg --configure openssh-server

そしてついに

$ systemctl enable sshd

5
Ferrari21