We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

[Solved] SSH connection to Sailfish OS failed [answered]

asked 2020-03-09 23:07:19 +0300

wmcig gravatar image

updated 2020-03-10 18:31:45 +0300

I tried this command via my Linux terminal to connect to the SFOS device: ~ $ ssh nemo@192.168.2.15

This is the answer. ssh: connect to host 192.168.2.15 port 22: Network is unreachable

How can I solve this problem?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by wmcig
close date 2020-03-10 20:45:40.138217

Comments

should we assume you have developer mode enabled and remote connection also enabled on your sfos device?

Spam Hunter ( 2020-03-09 23:28:21 +0300 )edit

Also tried the WLAN IP?

objectifnul ( 2020-03-10 01:43:02 +0300 )edit

Are both devices in the same network? Maybe you should post the output of ifconfig of both devices to exclude possible general network issues.

Pohli ( 2020-03-10 06:18:24 +0300 )edit

Both devices are in the same network. Developer mode and remote connection are enabled on the SFOS device. I do not tried the WLAN IP. How can I check this?

wmcig ( 2020-03-10 07:58:56 +0300 )edit
1
  • Is the phone connected via USB?
  • What is your local IP on the USB-Device of the PC?
  • have you checked Settings-USB that developer mode is active?
  • can you ping the phone feom your PC?
jollajo ( 2020-03-10 08:21:27 +0300 )edit

5 Answers

Sort by » oldest newest most voted
1

answered 2020-03-10 15:28:50 +0300

number51 gravatar image

I might have have the same issue on Xperia X and XA2. I think it came with one of the last updates.

Check if sshd-service is running:

$ systemctl status sshd

Eventually start sshd-service, if not running:

$ devel-su systemctl start sshd

Then try again to connect via ssh.

edit flag offensive delete publish link more
1

answered 2020-03-10 18:31:27 +0300

wmcig gravatar image

Thanks a lot for the answers and comments in this topic.

It was my mistake yesterday. I wanted connect to the IP of the USB connection. This morning I saw the WLAN IP address, which is above the USB IP. The WLAN IP you can see not so good like the USB IP, I do not know why.

Now the connection via SSH is working!

edit flag offensive delete publish link more

Comments

you may close this issue if it is solved for you

jollajo ( 2020-03-10 18:54:23 +0300 )edit
0

answered 2020-03-10 10:07:50 +0300

nephros gravatar image

updated 2020-03-10 10:36:41 +0300

"Network is unreachable" means your Linux computer has no idea how to connect to the ip/network you have given (192.168.2.15). Usually this is because there is no network card configured on the Linux host which would be able to connect to the given IP address.

192.168.2.15 is typically used by SailfishOS devices using networking over USB. This is not trivial to set up correctly under Linux and is very likely not what you want.

If you simply want to ssh into the SFOS device over a common network you will have to find out (through developer mode on the SFOS device) which WLAN IP your device has, and use that IP address to connect from the Linux computer (which also has to be connected to the same WLAN).

ADDITIONAL NOTE: The WLAN access point you are using may have "Client Separation" enabled, which means it won't let devices connected via WLAN talk to each other. This could cause further problems if you try to connect from a Linux box to your SFOS device via WLAN. If you have access to the access point's settings, turn off Client Separation while experimenting.

edit flag offensive delete publish link more
0

answered 2020-03-10 15:34:49 +0300

olf gravatar image

Try, while having a shell open as user nemo:
Simply start the terminal app on the device, before SSHing to the device.

On my devices this is often (always?) needed to ssh, scp or rsync -e "ssh" to a SailfishOS device.

edit flag offensive delete publish link more
0

answered 2020-03-10 18:39:33 +0300

Chris_ gravatar image

do you use tethering via usb?

edit flag offensive delete publish link more

Comments

No I do Not use it.

wmcig ( 2020-03-10 20:45:05 +0300 )edit

Question tools

Follow
4 followers

Stats

Asked: 2020-03-09 23:07:19 +0300

Seen: 1,553 times

Last updated: Mar 10 '20