SSH Stop working : Network error connection refused

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
bricolodu13
Posts: 20
Joined: Fri Oct 23, 2015 10:51 am

SSH Stop working : Network error connection refused

Post by bricolodu13 » Fri Jul 12, 2019 1:41 pm

Hello I have a VERY WEIRD problem with 3 dietpi headless / serial connection not enabled
=> Network error connection refused

latest Dietpi version

1x Rpi 3a+, just had the time to install fresh version of Diepi, than I got the "Network error connection refused" after reboot
I tried again, a new fress install on a second Rpi 3a+ and got exactly the same issue.

I plugged in an other Rpi 3b+ with its own SD (that was still working yesterday), and got exactly the same issue, impossible to connect anymore !

In each case I see the IP address (Fing Oveerlook) and I can still access the logitech media server web page...

I erased the cache from my putty on Windows, tried from another Windows PC, Switched off and restarted my internet router, no way !

I tryed another router, not connected to Internet and from none of the peripherals had ever been connected to, still
Network error connection refused, although I got the IP address of each peripherals.

In other words, I can't access anymore my long time running setup and I can't install new setups !

:cry: :cry: :cry: :cry: :cry:

Do you have any hints to recover the connection and most important to avoid this problem in the future ?

Best
JB

bricolodu13
Posts: 20
Joined: Fri Oct 23, 2015 10:51 am

Re: SSH Stop working : Network error connection refused

Post by bricolodu13 » Mon Jul 15, 2019 9:25 am

Hello,

It looks like I'm the only person experimenting this issue.

The fact is that in the meantime I did a fresh Raspbian install and did not get any issue.
So, that's a problem with dietpi.

I really hate not understanding, it should not be black magic after all.
So should anyone has an idea of the why, I would appreciate.

Thank you.
Jean

rasputin
Posts: 11
Joined: Sun Jun 23, 2019 1:49 pm

Re: SSH Stop working : Network error connection refused

Post by rasputin » Tue Jul 16, 2019 8:27 am

Hi!

Strange problem!

You said, you can successfully access other network services provided on your devices, but not ssh, correct?

Did you tried to ping the devices running DietPi? What was the result?

Do you have the chance to recover the log files from the DietPi devices, e.g. "journalctl -u ssh"? Do you see any error logs that may correspond to your problem?

Regards, rasputin

bricolodu13
Posts: 20
Joined: Fri Oct 23, 2015 10:51 am

Re: SSH Stop working : Network error connection refused

Post by bricolodu13 » Wed Jul 17, 2019 11:24 am

Hello Rasputin,

Thank you for taking care. 8)

Yes, you got it right, I can sort of ping the Pi as the Pi IP adress is seen by IP scanners and I can access the Media server that is running on the Pi.
Alas, as i didn't allow serial access, I can't investigate.

Anyway, TBH, I will not investigate further, I already lost too much time on that.
The only thing I'm thinking about that could result in such behaviour is Fail2Ban that was running on all these install

I've erased the SD card, as I couldn't do anything and I will test a new fresh install without Fail2Ban.

Best regards,
Jean

bricolodu13
Posts: 20
Joined: Fri Oct 23, 2015 10:51 am

Re: SSH Stop working : Network error connection refused

Post by bricolodu13 » Wed Jul 17, 2019 5:50 pm

Hello,

I made a fresh new install, WITHOUT FAIL2BAN
And I got the exact same issue !
It happened just after that I changed the priorities, nice etc... with the dietpi-process_tool utility
I did the change and it corrupted my setup.

I hope you can make a fix.
Jean

bricolodu13
Posts: 20
Joined: Fri Oct 23, 2015 10:51 am

Re: SSH Stop working : Network error connection refused

Post by bricolodu13 » Thu Jul 18, 2019 1:21 pm

Hello,

On my last setup I was wise to keep Serial connection so I just tried again to connect to my latest setup with a serial connection.
OK, I get access.
(Note that I should have thought of moding the DietPi/config.txt manually, it would have saved me a lot of time)

I had a look at the Dropbear service and found it inactive !
I made it active again and could connect through putty port 22.
However after each reboot, I get the same issue, meaning that the dropbear is again inactive and I have to activate it through Serial connection.

The result of : journalctl -u ssh
-- No entries --

So now the questions are :
  • Why does dropbear can suddently become inactive without any inteaction from the user side ?
  • How can I definitively fix that issue ?

rasputin
Posts: 11
Joined: Sun Jun 23, 2019 1:49 pm

Re: SSH Stop working : Network error connection refused

Post by rasputin » Fri Jul 19, 2019 8:27 am

Hi!

Strange, that "journalctl -u ssh" returns no logs on your machine. I am using OpenSSH. I see the start of the service in journalctl:

Code: Select all

Jul 18 12:41:40 rasputin systemd[1]: Starting OpenBSD Secure Shell server...
Jul 18 12:41:40 rasputin sshd[2012]: Server listening on 0.0.0.0 port 22.
Jul 18 12:41:40 rasputin sshd[2012]: Server listening on :: port 22.
Jul 18 12:41:40 rasputin systemd[1]: Started OpenBSD Secure Shell server.
Jul 18 12:42:59 rasputin sshd[2402]: Accepted publickey for ...
I would expect that journalctl returns similar logs on your machine that show Dropbear has started. And I would expect logs when Dropbear transits to "inactive" ...

Did you tried "systemctl status ssh" right before restarting Dropbear to get any hint what could cause the problem?

Regards, rasputin

rasputin
Posts: 11
Joined: Sun Jun 23, 2019 1:49 pm

Re: SSH Stop working : Network error connection refused

Post by rasputin » Fri Jul 19, 2019 8:32 am

Hi bricolodu13!

Can you try the command "journalctl | grep ssh" instead of "journalctl -u ssh"?

Regards, rasputin

rasputin
Posts: 11
Joined: Sun Jun 23, 2019 1:49 pm

Re: SSH Stop working : Network error connection refused

Post by rasputin » Fri Jul 19, 2019 8:57 am

bricolodu13 wrote:
Wed Jul 17, 2019 5:50 pm
It happened just after that I changed the priorities, nice etc... with the dietpi-process_tool utility
I did the change and it corrupted my setup.
What exactly did you do?

Post Reply