Home > Guides > Terminal/ssh on Jolla phone/SailfishOS when not in developer mode

Terminal/ssh on Jolla phone/SailfishOS when not in developer mode

December 11th, 2013 Leave a comment Go to comments

Disclaimer: you probably aren’t supposed to do any of this and may void your warranty or if you’re completely clueless even break something on your phone temporarily or permanently. Don’t do this if you are unsure of any part of it.

I got a Jolla phone today since the DNA store near my place of employment had gotten a small shipment. Now I do use the phones for communication, but more so in text form, particularly IRC.

The phone has a very nice terminal app called fingerterm which is pretty much perfect for using irssi, my IRC client of choice. Unfortunately, the icon for the terminal only shows if once is in “developer mode” which is probably a good thing in the case of users who might or might not even know what a terminal is. I however want to access it all the time, so I set to investigate. I also wanted to make a separate shortcut and have it to auto-connect to a ssh server.

A quick look at the developer mode shows that the actions it takes is at least as follows:

-Enable terminal access by creating fingerterm.desktop in /usr/share/applications
-Enable SSH server (if activated in developer options) for connection via USB or WLAN.
-probably some/many other things too but for the purposes of this guide they are irrelevant.

So, I now knew the method of removing terminal access was removal of the shortcut. So, what to do to keep it enabled?

1. Enable developer mode and read and accept the disclaimer. Or don’t accept and just stop reading this guide here.
2. Set a password. Preferably a strong one. You won’t need it daily, at least for IRC.
3. Open the terminal OR, preferably, Connect to your phone via a SSH client from your computer. Via WLAN or usb, it is irrelevant. You can see the IP address needed while in the developer mode window. Linux native users (and mac users, maybe?) can use “ssh”, Windows users need to get an application such as putty. The terminal character set of the phone is UTF-8 (putty defaults to an older one). Type in the username “nemo” then the password you set earlier.
4. Type in: “devel-su” and your password. You are now root, BE CAREFUL. If you do not know what root is, wtf. Read more before you follow guides that  require root access.
5. Type in: cp /usr/share/applications/fingerterm.desktop /usr/share/applications/fingertermautossh.desktop
You can actually use anything in place of “fingertermautossh” provided of course the name you want isn’t already in use by something else. I used this one since it is relevant for what I’ll use it to accomplish.
6. Thats it! you can now exit developer mode and will still have access to terminal. You can also make multiple copies with different names if you feel like it

Bonus: automatic SSH connection:

7. type in: vi /usr/share/applications/fingertermautossh.desktop
8. This is the file that the OS uses to generate the icon. You can name it for example ssh user@hostname.
9. Push Insert or I to be able to edit the file. For automatic ssh connection, add text to the line Exec=fingerterm, adding in -e ‘ssh user@hostname’. This will make the terminal app automatically start a ssh session. If you do not type in the user name, it will attempt to login to your host as the user “nemo”.
10. Push esc, then type in ” :wq” this will save your starter file and exit the terminal text editor.
11. If you are confident you won’t lose your phone (or don’t care about the thief having access to your server, too) you can also use the utilities ssh-keygen and ssh-copy-id to create and copy a keyfile to your server for passwordless authentication. There are enough tutorials of this elsewhere so I won’t go into detail.
However be VERY careful should you choose to do this. Even if you set a passkey on your device, there probably still are enough security issues with SailfishOS since it is in beta that you should not consider it safe. If an attacker gets your private key, your account on your server, too, is compromised.

Information derived from:
Access the Terminal when Developer Mode is turned off
Fingerterm Documentation

Categories: Guides Tags:
  1. No comments yet.
  1. No trackbacks yet.