SSH is a pretty nifty tool for my toolbox. I don't have any servers (yet) or anything of the sorts, but it's a neat way for me to access my computer from my phone. It makes transferring files and stuff much easier (easier than KDE Connect at times). For some reason, my SSH setup thing stopped working, so I'm going to fix it. I'll put the intstructions here so that I (and you) can reference it again in the future. This is for connecting to a computer from an Android device.
I'll be using Termius on my (Android) phone.
You'll need to install SSH. On Linux, the package generally goes by some variant of the name
openssh
.
If you are a user of systemd, you can check if it's working through sudo systemctl status ssh
. If
not, I
can only speak for runit. On Void Linux, for example, you're going to have to ln -s /etc/sv/sshd
/var/service
. Use root privelages as
needed. Then, to enable it, either reboot or run sv start sshd
. To check its status, sv
status
sshd
. This is more of a how-to-use-runit thing, so I'll stop right here.
The next thing is to get the IP address of what you are going to connect to. This can be found by using
ip
address
.
This should be enough to now be able to log into your system from your phone. If you're fine with using your computer's password to log in, then this is it.
The sequence of steps is as follows:
/etc/ssh/sshd_config
in a text editor. Change the port number to 2222./etc/ssh/sshd_config
in a text editor. Search for "PasswordAuthentication". Change the
"yes"
into a "no".Now, we should have a working SSH setup.
This article was written on 16/08/2023 and modified on 29/08/2023. If you have any thoughts, feel free to send me an email with them. Have a nice day!