I’ve got Debian 12 running an SSH server and it used to be fine and dandy, but today I noticed that I can’t connect anymore. Using Windows 11 Pro using PowerShell to do ssh onni@192.168.1.87 I get the response “ssh: connect to host 192.168.1.87 port 22: Connection refused”. It used to work a few days ago and I haven’t updated anything,
I even ran
sudo apt-get remove openssh-client openssh-server
sudo apt-get install openssh-client openssh-server
and installed udw and ran
sudo ufw allow 22
after that it still didn’t work.
After running sudo ssh status it outputs
ssh: Could not resolve hostname status: Name or service not known
Running sudo systemctl restart ssh just outputs
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xeu ssh.service" for details.
sudo ss -an | grep 22 outputs:
nl UNCONN 4352 0
4:2259
* nl UNCONN 0 0 9:2256
* nl UNCONN 0 0 9:-632622466
* nl UNCONN 0 0 15:-222698859
* nl UNCONN 0 0 15:-622134927
* nl UNCONN 0 0 15:-222698859
* nl UNCONN 0 0 15:-622134927
* u_str ESTAB 0 0 * 21796
* 22725 u_str ESTAB 0 0 /run/user/1000/bus 23588
* 22294 u_str ESTAB 0 0 * 22451
* 24662 u_str ESTAB 0 0 /run/systemd/journal/stdout 23179
* 22326 u_str ESTAB 0 0 /run/user/1000/pipewire-0 21922
* 18127 u_dgr ESTAB 0 0 * 20387
* 1622 u_str ESTAB 0 0 /run/systemd/journal/stdout 23112
* 22321 u_str LISTEN 0 1 /tmp/.X11-unix/X1 22835
* 0 u_str LISTEN 0 4096 /tmp/.ICE-unix/851 22299
* 0 u_str ESTAB 0 0 * 22203
* 23029 u_str ESTAB 0 0 * 22832
* 22831 u_str ESTAB 0 0 * 22340
* 22341 u_str ESTAB 0 0 /run/dbus/system_bus_socket 24662
* 22451 u_str ESTAB 0 0 /run/dbus/system_bus_socket 23029
* 22203 u_dgr ESTAB 0 0 * 18022
* 1622 u_str ESTAB 0 0 * 18127
* 21922 u_str ESTAB 0 0 * 22738
* 20884 u_str ESTAB 0 0 /run/user/1000/bus 23181
* 22331 u_str ESTAB 0 0 /run/dbus/system_bus_socket 22725
* 21796 u_str ESTAB 0 0 /run/systemd/journal/stdout 21997
* 22823 u_str ESTAB 0 0 /run/systemd/journal/stdout 20766
* 22632 u_str ESTAB 0 0 * 22331
* 23181 u_str ESTAB 0 0 /run/systemd/journal/stdout 23547
* 22433 u_str ESTAB 0 0 /run/user/1000/bus 22742
* 20891 u_str ESTAB 0 0 /run/user/1000/bus 18229
* 22864 u_str ESTAB 0 0 * 22632
* 20766 u_str LISTEN 0 128 /run/user/1000/wayland-0 22833
* 0 u_str ESTAB 0 0 * 22447
* 24660 u_str ESTAB 0 0 * 22420
* 22421 u_str ESTAB 0 0 /run/systemd/journal/stdout 22703
* 20813 u_str LISTEN 0 128 /run/user/1000/openssh_agent 18221
* 0 u_dgr ESTAB 0 0 * 70196
* 1622 u_dgr ESTAB 0 0 * 19178
* 1622 u_str ESTAB 0 0 * 22449
* 22450 u_str ESTAB 0 0 * 22321
* 23112 u_dgr ESTAB 0 0 * 16255
* 1622 u_dgr ESTAB 0 0 * 20826
* 1622 u_str ESTAB 0 0 /run/user/1000/bus 42296
* 43251 u_str ESTAB 0 0 /run/user/1000/bus 22421
* 22420 u_str ESTAB 0 0 * 22326
* 23179 u_str LISTEN 0 4096 /run/avahi-daemon/socket 16221
* 0 u_dgr ESTAB 0 0 * 17740
* 1622 u_str LISTEN 0 4096 /run/cups/cups.sock 16223
* 0 u_str ESTAB 0 0 /run/dbus/system_bus_socket 22044
* 20997 u_str ESTAB 0 0 * 22864
* 18229 u_str LISTEN 0 4096 /run/dbus/system_bus_socket 16225
* 0 u_str ESTAB 0 0 /run/user/1000/kwallet5.socket 22752
* 0 u_str ESTAB 0 0 * 22865
* 22866 u_dgr ESTAB 0 0 * 16281
* 1622 u_dgr ESTAB 0 0 /run/systemd/journal/dev-log 1622
* 0 u_str ESTAB 0 0 * 25322
* 25323 u_str ESTAB 0 0 /run/dbus/system_bus_socket 20884
* 22738 u_str ESTAB 0 0 * 22831
* 22832 u_dgr ESTAB 0 0 * 17704
* 1622 u_dgr ESTAB 0 0 * 21975
* 1622 u_str ESTAB 0 0 * 22294
* 23588 u_str ESTAB 0 0 * 62235
* 62234 u_dgr ESTAB 0 0 * 26070
* 1622 u_dgr ESTAB 0 0 * 17684
* 1622 u_str ESTAB 0 0 * 22727
* 22728 u_str ESTAB 0 0 * 62234
* 62235 u_seq ESTAB 0 0 * 62722
* 62723 u_str ESTAB 0 0 * 20997
* 22044 u_str ESTAB 0 0 * 22866
* 22865 u_str ESTAB 0 0 /run/user/1000/wayland-0 24660
* 22447 u_str ESTAB 0 0 * 22429
* 23546 u_str ESTAB 0 0 * 20813
* 22703 u_seq ESTAB 0 0 * 62723
* 62722 u_str ESTAB 0 0 /run/user/1000/wayland-0 23022
* 23021 u_str ESTAB 0 0 /run/systemd/journal/stdout 23546
* 22429 u_str ESTAB 0 0 /run/systemd/journal/stdout 22728
* 22727 u_str ESTAB 0 0 * 22823
* 21997 u_str ESTAB 0 0 /run/user/1000/bus 22450
* 22449 u_dgr UNCONN 0 0 * 22737
* 0 u_str ESTAB 0 0 * 20891
* 22742 u_str ESTAB 0 0 /run/systemd/journal/stdout 25323
* 25322 u_str ESTAB 0 0 /run/systemd/journal/stdout 21996
* 22819 u_str ESTAB 0 0 @/tmp/.X11-unix/X1 22341
* 22340 u_str ESTAB 0 0 * 22433
* 23547 u_str ESTAB 0 0 * 23021
* 23022 u_str ESTAB 0 0 * 43251
* 42296 u_str ESTAB 0 0 * 22819
* 21996 u_str LISTEN 0 1 @/tmp/.X11-unix/X1 22836
* 0 u_str LISTEN 0 4096 @/tmp/.ICE-unix/851 22298
* 0 tcp ESTAB 0 0 192.168.1.87:53536 34.1
07.221.82:80 tcp ESTAB 0 0 192.168.1.87:38468 104.
18.40.222:443 tcp ESTAB 0 0 192.168.1.87:53544 34.1
07.221.82:80 tcp ESTAB 0 0 192.168.1.87:60228 142 .250.74.3:80
Got any ideas on what’s causing all this?
Thank in advance.