Accessing a computer from a phone: methods and what to choose
The task sounds simple: you are not sitting at your computer, but you need it. I forgot the file, I need to restart the program and see how the long process ended. There are several ways to reach the computer, and they differ not so much in convenience as in what breaks in real life.
Three approaches to choose between
Remote desktop. You see the entire computer screen and move your finger across it. It’s good when you need graphics: a program with windows, a browser, an editor. It’s bad on a phone: the interface is designed for a mouse, it’s hard to get into small elements, and the image eats up traffic.
Console. You are working with the command line, there are no graphics. Economical in terms of traffic, accurate and fast, but you need to know the commands. For running processes, viewing logs and working with files, this is often the best option.
A separate application for the task. Something narrow: a file manager, a control panel, a remote control for a specific program. It’s convenient until the task goes beyond the scope for which the application is designed.
Most people want the second option with pieces of the first: a console to work with plus the ability to occasionally look at the screen.
What breaks in practice
White IP and port forwarding. The classic scheme requires that your computer can be connected from outside. The home Internet usually has a gray address, and the router needs to be configured. Half the people stay here.
Communication interruptions. The phone switches between towers and Wi-Fi, the address changes, the connection breaks. If the process was started inside your session, it dies with it.
Keyboard. The console requires Esc, Ctrl, Tab and arrows. There are no them on the mobile keyboard; applications put them on a separate panel, and it’s inconvenient to touch it with your finger.
Scroll. Programs that draw the screen themselves take the gestures for themselves. You try to scroll through the output, but instead you click on a menu item.
How to do without a public IP address
There is only one working method: the connection is initiated by the computer itself. It connects to the intermediate server and keeps in touch, and the phone connects there too. Your computer is not listening to anything from the outside, so neither port forwarding nor router configuration is needed.
This is how all cloud remote access options work, the only difference is who owns the intermediate server and what it sees.
What to do with cliffs
The answer is where the process lives. If a task is running inside your session, breaking the connection kills it. If it is running on the computer itself as a separate process, and you are only looking at its output, then the loss of connection does not spoil anything: you returned, connected, and saw the same screen.
In the console this is done via tmux or screen. You have to remember to start them in advance, and this is their main drawback.
About safety
Three things to check with any solution.
Who sees the content? If the intermediate server decrypts your traffic, it sees everything: passwords, keys, files.
How access is revoked. Lost your phone, what next? It should be possible to disable a specific device, rather than changing passwords everywhere.
What happens when you reboot. If the computer has rebooted, access should return on its own, otherwise there is little point in remote work.
How much does it cost
Free options exist and are usually sufficient for home tasks. You have to pay for two things: for the stability of the intermediate server when you are far away, and for not having to configure it yourself.
For us, the border goes like this: working with a computer on your home network is free forever, and connecting via the Internet is included in the subscription for 900 rubles per month. For the first seven days, everything is available, no card is needed.
Try it
Opens in the browser, no application required. The first 7 days are free and without a card, then 900 ₽ per month.
Open web versionIf you don’t have a computer at hand at all
A separate case: the machine is needed not to look at a file, but for something to constantly work on it. Then the home computer is a bad choice because it sleeps and turns off. It’s more logical to take a server, put something on it that should work around the clock, and connect to it. We examined this scenario separately in the article about agent on your server.
Briefly
If you need graphics, look towards the remote desktop and endure the inconvenience of management. If you need work, take the console. In both cases, check three things: whether the solution requires a public IP address, whether the task survives a connection loss, and how quickly access is revoked from the lost phone.