I always have the same issue, whenever I restart my router I can not connect to my PI over SSH.
That one is caused by network interruption.
Is there a service or some command that I can restart/run to fix this issue?
So far I have to restart my PI and that’s not so easy specially when someone else is watching TV…
I do have webmin installed on my PI so I can run some custom commands or restart services even if SSH connection is not possible…
First thing to mention is that my PI is connected via cable.
A router restart generates just a short network interruption (1min), after that Kodi and nearly any other service like nginx, VPN , etc… are running ok expect SSH.
So the PI has a static DHCP config on the router, so that always will get the same IP, but still same issue.
That says to me that there is something ‘booked’ which will get cleared by a reboot - but not just by the stop/start.
Did you think to try the reload … ?
Derek
Sorry but I’m really sceptical of this problem - OpenSSH binds to INADDR_ANY which means that it listens on all interfaces and it does not matter if the interface goes down or comes back up or not, or whether it gets a different IP address - it will always accept connections. No need to stop and restart anything.
Your systemctl status line clearly shows OpenSSH is still running.
I’ve interrupted the network connection hundreds maybe thousands of times during OSMC testing/development (both Ethernet and Wifi) and never once had problems with the SSH server mysteriously not responding yet other services are working. Nor has anyone else reported the same issue on the forum.
I strongly suspect that some 3rd party software you have installed is causing this issue and that you would not see it if you did a fresh install. You say you have webmin installed - webmin can be fairly invasive as it basically edits/controls the configuration files of many system daemons, and I doubt that it is fully compatible with Debian Jessie running systemd and connman as the network manager, as connman is a bit non standard in this application.
Is there anything else you have installed such as firewall software, or things like fail2ban ?
Finally, are you trying to connect via IP address or are you relying on a hostname such as osmc.local ?
It maybe that Webmin changed something, I was not aware that is not fully compatible with jessie
I have installed several software on my PI aside from the standard… would be quite hard to remember all of them now , but maybe some of them, Couchpotato, sickrage, google coder, openVPN + iptable rules needed, mosh …
I always use ip address.
Strange think I had this issues in the past also with raspbmc…
UPDATE: it seams only from my PC I can’t connect which is also connected via cable.
From my android phone it works… sorry for bothering you with stupid questions…