I have this issue: I installed Ubuntu Server 18.04 to my Raspberry Pi 4 and it is connected through the ethernet port. If I exit the ssh session, some minutes later the RPI4 is unaccessible with ssh, and the leds of the ethernet port are turned off, just the red led indicating that is connected to the power supply.
I have not installed any Desktop GUI, just a fresh installation of Ubuntu Server.
Thanks in advance.
I had a similar issue, I found this - it has changed something, just waiting to see if it fixes it now
https://www.unixtutorial.org/disable-sleep-on-ubuntu-server/
tl;dr - run this: