0

I have a MiniPC running Ubuntu 22.04 in a recreation-home. After a power loss, the Host answers ping, however with SSH I get "connection refused" error. Why does it lock the port or disable SSH server, even though the system seem to be booted fine? That house is 300km away from me and now I have to go there because of this stupid behavior

ssh -vvv hhsl@192.168.20.202
OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.20.202 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.20.202 [192.168.20.202] port 22.
debug1: connect to address 192.168.20.202 port 22: Connection refused
ssh: connect to host 192.168.20.202 port 22: Connection refused
  • Hello, it will be useful to post the output of ssh -vvv user@host..., where -vvv stands for much more verbose :) If you are using encrypted home, please read: SSH is allowing remote connections only after a local login to the server. – pa4080 Sep 18 '22 at 12:21
  • ' ssh -vvv hhsl@192.168.20.202 OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for debug2: resolve_canonicalize: hostname 192.168.20.202 is address debug2: ssh_connect_direct debug1: Connecting to 192.168.20.202 [192.168.20.202] port 22. debug1: connect to address 192.168.20.202 port 22: Connection refused ssh: connect to host 192.168.20.202 port 22: Connection refused' – LittleNo Sep 18 '22 at 13:16
  • 1
    "connection refused" usually means you're a little bit screwed, because that means SSH is not properly functioning on the remote host, or that a firewall is blocking. The system can boot fine but the firewall or sshd can interfere with the SSH connection. Given that there's an instant connection refused but ping works I wouild say that it's likely sshd is not properly running. Or your firewall is not blocking ICMP but blocking SSH. Unfortunately there's no way to resolve this without physical machine access, and there's nothing we can really do to 'debug' this with just the SSH client. – Thomas Ward Sep 18 '22 at 17:24
  • It seems odd that a machine 300km away would be on a LAN private (192.168.xx.xx) network segment - are you using a VPN of some kind? How exactly are IP addresses being assigned? is it possible that the machine has rebooted with a different IP? – steeldriver Sep 18 '22 at 19:26
  • yes theres a pfSense Firewall which I'm using for OpenVPN dial in. The host has a static DHCP mapping. I can see traffic for this particular host on the firewall, so it is definately running – LittleNo Sep 19 '22 at 04:56

0 Answers0