SSH connection over USB from Windows PC to Sailfish device

Jolla Care -

 

This help article is for Windows 10. If you use Linux/Ubuntu then read this article.

 

Pre-requisites

You must unlock the device lock and the encryption of your phone with the security code before you can make an SSH connection to the phone. See these articles: device lock and encryption.

Make sure you have the Developer mode enabled on your Sailfish device. If not, see this article.
If you have not defined any SSH password yet (or you have forgotten it) in "Settings > Developer tools > Remote connection" then create one for yourself. You will need it soon.

Note that there different usernames on the phone depending on the Sailfish OS version. On 3.4.0 or later, there are two possible usernames, nemo and defaultuser. Only the correct one works. You can check it from the prompt of the Terminal app on the phone or with the command below (before getting root rights).

echo $USER

It replies either nemo or defaultuser. If you should get root then do exit first and try again.

Create the SSH connection with the correct command (matching your username) below.

 

USB connection

Connect a data-enabled USB cable between your PC and your Sailfish device. At the moment of connection, choose "Developer mode" at the device display.

 

Setting up an SSH session

1. Launch Putty application on PC

If your phone has Sailfish OS 3.4.0 or later, there are two options for the username of the primary user

   - enter defaultuser@192.168.2.15 or nemo@192.168.2.15 to the Host name (IP address) box

If your phone has Sailfish OS 3.3.0 or earlier,
   - enter nemo@192.168.2.15 to the Host name (IP address) box

Alternatively, you can enter just 192.168.2.15 and then, when prompted, type the correct username. See the picture below.

Check that SSH is selected for the connection type.

 

Putty1.png

 

Click Open.

2. Terminal window of Putty appears (black background)

   - type your SSH password

You are now in the directory $HOME of the phone.

 

 

Examples:

Check what is in the home directory:

ls -al

 Check the repositories required for over-the-air updates of Sailfish OS

ssu lr

 

Troubleshooting

If the connection attempt fails, disconnect the phone from the PC. Restart the phone (consider restarting the PC, too).  Try again.

When the connection is on successfully, it is possible to issue the ping to address 192.168.2.15 with root rights (see the picture below).

This picture shows the successful flow of events:

 

Putty2.png

 

 

 

 

Have more questions? Submit a request
Powered by Zendesk