So my PC has this issue that it freezes, then shortly after the display goes out and I have to hard reboot it. Luckily this is very seldom, but still annoying.
Somewhere in the past I have read, that one might still be able to remote connect to it (via ssh) and then check it or issue commands like a graceful reboot.
So how would I do that? (please explain for a noob). Ideally I want to use my phone for the connection, there are some ssh apps on f-droid.
Yes you can but youâll have to open port 22 (the usual SSH port) in your router and forward it to your pc or use your personal VPN for a more secure connection. I use the connectbot app on my phone which is open source and available in f-droid. In the settings add a new host see > https://www.techwalla.com/articles/how-to-use-connectbot
I recommend using a VPN to connect to your home network for a secure connection.
You need to enable the service as mentioned, for example enteringsudo systemctl enable sshd.service. You should then be able to log in via ssh on port 22 (unless you manually change). There are many ssh options that can be configured in the config file, if you need any further info Iâm happy to try and help.
Just to clarify as well, you shouldnât need to port forward port 22 unless trying to access from outside your local network. As Chomsky states, if this is something you wanted to do, a VPN may be a better option. Personally, I access my home network from outside by having a VPN server on my home network that, once connected to, I can ssh from to any other device that I have ssh activated on. I therefore only need to port forward the port I use for my VPN to my VPN server.
to see what is running on my devices, I tend to use htop. This will show you running processes, and you can order by e.g. processor use. If your computer is still responding to ssh commands, you can use kill to stop processes you need to, or you could for example reboot if necessary.
Donât do this. Never! You will be bombarded with login attempts. You should open a completely unrelated port on the router and then forward it to port 22 in your computer. Alternatively you can change the sshd port in /etc/ssh/sshd_config and then open it in your router.
Yes, I used fail2ban also, but itâs much more efficient to have a different port forwarded (or a VPN). Itâs so efficient that I even stopped using fail2ban due to the absence of login trials.