Can I ssh from my Android phone to my fedora laptop remotely?

I want to be able to control my laptop at home using ssh so whenever I am without my laptop (on the train for example) I can access it by simply connect to the ssh at home.
Is it possible to “leave” ssh open while the laptop is locked?
Is there any security Hazzard in this ?

Thanks

Yes you can leave your laptop locked and ssh opened in your home and then you can do proper network configuration in order to access it.

Basic ssh config and firewall settings for your laptop is

systemctl enable sshd --now 
firewall-cmd --add-service=ssh --permanent
firewall-cmd --reload

Also when you setup your router/network config you should be able to access to your laptop and do ssh. But make sure you also do proper security conflagration as well. I only wrote basic config and gives you idea how to to reach. But you wanna do more about it. You can try to setup VPN configuration on your router if possible or you can use something like raspberry pi for in order to reach your local network then you can ssh your machine (safer)

There multiple options you can do but this is just a couple of them.

1 Like

To add to this comment: You will need termux, which is a terminal emulator for android. You should download it from f-droid not google play store (because the google play hosted version is outdated).

Depends, if you are securing your ssh keys properly and keeping it up to date it may not be a problem.

Also you should be aware of the problems of an ssh server that is behind a NAT, it needs special configuration.
This may help: How to access a Linux server behind NAT via reverse SSH tunnel

1 Like