Debian 10 "Buster" 업데이트 중 sshd를 포트 2222에 바인딩하는 동안 오류가 발생했습니다.

Debian 10 "Buster" 업데이트 중 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 ago Docs: 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

또한 .NET에서 포트 22가 2222로 변경되었음을 고려하십시오 /etc/ssh/sshd_config.

어떤 아이디어가 있나요?

답변1

이 작업은 다음과 같이 수행할 수 있습니다.

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

그럼 드디어

$ systemctl enable sshd

관련 정보