I've been trying to reboot my ubuntu 22.04 remotely when a service is not running (i don't know why it fails when i'm not around).
I've installed and configured openssh (it's active when i run sudo systemctl status ssh). I also set up the ufw allowing ssh and port 22, but when i try to log in from windows 11 laptop it always says "Connection timed out".
Am i missing something? I'm kinda new to this.
EDIT: They're not on the same LAN. All I did was setting up openssh, its ufw in Ubuntu and then log in using ssh myUbuntuUsername@MyUbuntuIP with my laptop cmd. Any help is appreciated. (Also English is not my first language so excuse me if im mistaken).