Can't start sshd

● sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-10-30 18:57:32 GMT; 6s ago
    Process: 12031 ExecStart=/usr/bin/sshd -D (code=exited, status=255/EXCEPTION)
   Main PID: 12031 (code=exited, status=255/EXCEPTION)

Oct 30 18:57:32 stevef-w6567sz systemd[1]: sshd.service: Scheduled restart job, restart counter is at 5.
Oct 30 18:57:32 stevef-w6567sz systemd[1]: Stopped OpenSSH Daemon.
Oct 30 18:57:32 stevef-w6567sz systemd[1]: sshd.service: Start request repeated too quickly.
Oct 30 18:57:32 stevef-w6567sz systemd[1]: sshd.service: Failed with result 'exit-code'.
Oct 30 18:57:32 stevef-w6567sz systemd[1]: Failed to start OpenSSH Daemon.

Tried:

  • Unistalling / Re-installing
  • Deleting and recreating keys
  • Downgrading to 8.4p1 1

Just can’t get it to start, any ideas?

:edit:

sudo /usr/bin/sshd -d
Alias tip: _ /usr/bin/sshd -d
debug1: sshd version OpenSSH_8.4, OpenSSL 1.1.1h  22 Sep 2020
debug1: private host key #0: ssh-rsa SHA256:KUUukIvvASlg4mLN4VqJaynT4Wl/N3HcPx+s77XyFCM
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:ZYnNZMR4gIqdBxhX5I+rNg7v5oHOK/t1ZhfrMwk2Mwk
debug1: private host key #2: ssh-ed25519 SHA256:YIYjsLjY+6ZTsykgwRTLIDAsQnwIOx9rpAYeAHbqk58
debug1: rexec_argv[0]='/usr/bin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.

Port 22 is in use, now to find by what!

Found it - I was playing around with dropbear…

1 Like

Can you bind to a specific address?

I was playing with dropbear a few days ago, thought I had removed it…

2 Likes

It’s generally recommended to switch ports for ssh anyway, for security reasons.

1 Like

I only ssh from my phone, inside my own network, but the fact that I am a numpty is plain for all to see :smiley:

1 Like