Cannot SSH over USB to JP2026

REPRODUCIBILITY: 100%
OS VERSION: 5.2.0.22
HARDWARE: Jolla Phone 2026 (batch 3)
UI LANGUAGE: French
REGRESSION:

DESCRIPTION:

Hi Sailors,

I do not manage to open an SSH session over USB to Jolla Phone 2026 from a PC running under Linux. The error message is “Connection refused“. Moreover, the IP address is not set to the default one 192.168.10.15, but changes each time the USB cable is plugged.

Nevertheless, I manage to open an SSH session over WLAN, at the condition to disable the “Remote connection“ option and to enable it again (after a fresh boot of the phone).

PRECONDITIONS:

  • “Developer mode” enabled
  • “Remote connection” enabled
  • SSH password set
  • user data encryption enabled

STEPS TO REPRODUCE:

  1. connect a USB cable between the PC and the Jolla Phone 2026 ;
  2. choose “Developer mode” on the device display at the moment of connection ;
  3. open a terminal on the PC and type the following command :
$ ssh -v defaultuser@192.168.2.10

EXPECTED RESULT:

SSH session should open

ACTUAL RESULT:

ssh: connect to host 192.168.2.10 port 22: Connection refused

Verbose command outputs:

$ ssh -v defaultuser@192.168.2.10
OpenSSH_8.9p1 Ubuntu-3ubuntu0.18, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.2.10 [192.168.2.10] port 22.
debug1: connect to address 192.168.2.10 port 22: Connection refused
ssh: connect to host 192.168.2.10 port 22: Connection refused

MODIFICATIONS:

  • “Allow untrusted software” option enabled
  • Chum:GUI installed

ADDITIONAL INFORMATION:

On my Linux computer, here is the IP address of the Jolla Phone connected over USB :

$ ip addr
...
22: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether ce:63:0e:e0:79:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.10/24 brd 192.168.2.255 scope global dynamic noprefixroute usb0
       valid_lft 3233sec preferred_lft 3233sec
    inet6 fe80::d4fc:a94:f48f:6771/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
1 Like

Can you try different USB ports? There are issues with USB 3.0 ports so if that is what you are using, try either a USB 2.0 port or hub

@rgp Yes, I tried on different USB ports, without more success. I even tried on another Linux computer running Linux Debian distribution.

Two things. First, you should not allow for password authenticated logins to a SSH enabled machine. Nasty things happen… This news piece is fresh from press: https://sshhole.com/

As for debugging, you can multiply -v flags to get more verbose diagnostic from the client. This shall be more helpful, as it usually gives more granular failure points.

I have the same problem.

Here is the command output with the verbose mode set to 3 :

$ ssh -vvv defaultuser@192.168.2.2
OpenSSH_8.9p1 Ubuntu-3ubuntu0.18, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.2.2 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.2.2 [192.168.2.2] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: connect to address 192.168.2.2 port 22: Connection refused
ssh: connect to host 192.168.2.2 port 22: Connection refused

Don’t be surprised that the IP address over USB has changed : as previously said, it changes each time I plug the USB cable :slight_smile: and it does not correspond to the one set the Settings > Developer tools menu :

$ ip addr
...
7: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 42:e7:07:6b:87:0c brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.2/24 brd 192.168.2.255 scope global dynamic noprefixroute usb0
       valid_lft 3170sec preferred_lft 3170sec
    inet6 fe80::4818:66d6:ea8e:2216/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

You shall check on the device side. On a Unix like system one would look into /var/log/auth.log. Sadly, SFOS is systemd based so you shall look online for an equivalent on this log file.

Have same problem, using putty on windows. I’m on 5.2.0.22, but was not working with any previous version.

In my case IP is not changed when plugged, stays on 192.168.2.15/24.

Same cable & port(s) are working with xperia 10lll

EDIT: it turns out my problem is related to windows and RNDIS driver.
Was solved here: Jolla Phone (2026) + Windows 11: Has anyone successfully used USB Developer Mode (RNDIS)? , specifically this answer: https://forum.sailfishos.org/t/jolla-phone-2026-windows-11-has-anyone-successfully-used-usb-developer-mode-rndis/30616/8

I think the IP addresses in your logs might explain the connection refused error.

In your first example, you run ssh ``defaultuser@192.168.2.10, but ip addr shows that 192.168.2.10 is assigned to usb0 on your Linux PC. The same thing happens in your later example with 192.168.2.2.

So it looks like you’re trying to SSH into your own computer rather than the Jolla phone.

According to the Sailfish OS documentation, the phone’s default USB IP is 192.168.2.15, although you should confirm the actual value under Settings → Developer tools → USB IP address.

Could you try:

ssh defaultuser@192.168.2.15

Or use whichever USB IP address is configured on the phone.

Make sure the phone is unlocked, Developer mode is selected for the USB connection, and Remote connection is enabled.

If it still fails, try ping -c 3 192.168.2.15 from your PC and share the result.

I suspect this may be an IP addressing issue rather than an SSH server problem. The changing address on your PC’s usb0 interface doesn’t necessarily mean the phone’s address is changing too.

3 Likes

@Mrlaura Thanks a lot for your explanations ! Didn’t realize that the ip addr command shows the local interfaces of my computer… :flushed_face:

The ssh defaultuser@192.168.2.15 command works now. But during my previous SSH connection attempts, I am quite sure I tried to SSH to that 192.168.2.15 IP and it did not work. I am confused, sorry. :confused:

This may also add to the confusion. The security flaw referenced here is in a piece of software you don’t find on Sailfish OS, i.e., musl libc.

Perhaps, still using passwords to authenticate in remote access is an antipattern.

1 Like