SSH Bind to port 22 failed
After I updated my Ubuntu to 20.10 I started having problems with SSH. Every time the service starts at boot or when I manually start it with systemctl
, it errors saying that the ports are already in use (no matter which one I specify on sshd_conf
). Although this suggests that there is already an instance of ssshd running it doesn't make sense because systemctl status sshd
returns that the service has failed to start. If I do an nmap
on the host in question the ports are indeed open and I haven't found another application that is using them. There also seems to be another computer in the same network that is using the same IP and this is conflicting with the server. How do I solve this? Could an instance of an ssh server running on this other computer interfere with the server?
Update
Output of netstat -lnp | grep :22
:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
Output of ss -panetl | grep :22
:
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* ino:38210 sk:1c <->
LISTEN 0 128 [::]:22 [::]:* ino:38212 sk:22 v6only:1 <->
Solution 1:
It's likely another service or instance bound to the port - which one is unclear. Please run ss -panetl
and systemctl status
to verify and show us the output as well.