Connecting to your Linux system with your Android phone

Although using your mobile phone to connect to your Linux system may not seem like a particular priority, it is possible and you may have a good reason to do so from time to time. If you have an Android mobile phone, you can install a tool that allows you to connect, open a terminal session on your Linux box, and run commands just as you would if you were sitting in front of the system. Well, almost.

The tool that I recommend is called JuiceSSH. It installs easily, leaving an icon with a picture of a lemon with the name below it on your screen. Click on that icon and select Quick connection to configure your connection.

JuiceSSH picture 1 connect Sandra Henry-Stocker

You must enter something as user@192.168.0.4: 22 with your Linux username, target system IP address and port 22 specified. By default, the form should save the connection as shown in the image above. Enter your password when prompted.

Before embarking on any serious work, you will probably want to enlarge your font. To do so, go to Settings and scan down the menu looking for Font and Font size to make your choices.

JuiceSSH image 2 settings Sandra Henry-Stocker

When you change the font size, you can slide down to one that works for you. The sizes range from 1 to 30 points. Keep in mind that outputs from most commands are likely to be encapsulated, as the screen on your cell phone is quite narrow.

JuiceSSH image 3 font size Sandra Henry-Stocker

You can also change other settings (such as theme colors) if you want to customize your sessions further.

After connecting to Linux, you can ask who is logged in to the target system using WHO command. You might see something like this.

$ who
justme  tty2    2022-06-02 11:05 (tty2) 	<== console login
nemo    pts/0   2022-06-02 12:38 (192.168.0.12) <== login from another system
justme  pts/1   2022-06-02 12:43 (192.168.0.6)	<== login from your Android cell phone

If there are multiple logins, they will look very similar, but the latest should be at the bottom of the list and will show your cell phone’s IP address.

Going back to doing something else on your phone while leaving yours JuiceSSH session active, press the start button. Mine is a small circle in the middle at the bottom of my screen. It looks like it:

        ◁                  ▢

Later, you can re-enter your Linux session by simply clicking JuiceSSH icon again.

When you are back in your SSH session, you can press the up arrow repeatedly to repeat previous commands as you would when logged in to the console or user putty. If you do not see the arrow, tap the screen portion of the screen – above the keyboard. After pressing the up arrow a number of times, pressing the down arrow will take you back to more recently entered commands.

JuiceSSH image 4 session Sandra Henry-Stocker

Press CTRL in the line above your on-screen keyboard, then press “D” or simply type “log out” in your terminal window to end your SSH session.

NOTE: This post describes the free version of JuiceSSH. There is also a “Pro” version with additional features.

Closing

While this is probably not something you need to do often, it’s nice to know that you can use your Android mobile phone to log in to your Linux system. Fortunately, this is much easier to do than you might have imagined. I hope you try it and find some ways it can be helpful.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2022 IDG Communications, Inc.