SSH stops after battery level is low

I noticed that the SSH stops working with a ssh: connect to host 192.168.2.249 port 22: No route to host message when battery level is low. I suspect this low is around 30 - 40% (although not sure on exact number).

SSH does not work even when the phone is set to charging until a minimum value is reached.

Has anyone experienced this behaviour?

1 Like

No,

at least in Mobian there is no such behaviour. Maybe the phone tries to suspend itself faster than at 80% ?

1 Like

That means that 192.168.2.249 is not on the network.

Maybe wifi shuts down when the battery is low.

2 Likes

Phone is operational, I can browse and use terminal on the phone. Network works from phone but ssh, even from the phone, does not work if I use the 192.168.2.249 IP address. But ssh to 127.0.0.1 works.

1 Like

I did a reflash of my librem 5. Installed openssh-server after the first startup. It worked for a while then ssh stopped. interestingly, phone is connected to the wifi, I can access internet but ssh does not work.

ssh purism@127.0.0.1 works
ssh purism@192.168.2.249 does not work (even from librem 5 terminal)

All the settings are default.

@dos , any comments?

1 Like

Is wifi or cellular or both on?

What is the IP address of each? (That is, on the L5, what do
/sbin/ifconfig or ip addr say?)

/sbin/ifconfig
or
ip addr

Again “no route to host” means that address is not on the network.

1 Like

Yes, wifi and cellular are both on. I can make phone calls and browse internet as well.
ping command works fine.

I see the ssh and sshd services both are up and running.

purism@pureos: -$hostname -I
192.168.2.249

1 Like

Since you won’t answer questions whose answers might help diagnose the problem, I guess I am done.

1 Like

Apologies, I thought you wanted to know if machine has an IP address and I ran another command since I cannot do an ssh to librem 5 and provide the output.

1 Like

I ran the sudo dpkg-reconfigure openssh-server command

The ssh command is working after that. So far the ssh command is working fine. But I will provide an update if that fixes the issue

1 Like

It has the same behaviour after about an hour or so. I noticed that this behaviour happens only when the suspend option is enabled. So, not sure why ssh process does not work after resume-from-suspend although network works, I can browse etc.

@dos any comments?

1 Like

I noticed something interesting. The phone is connected to router (and internet), has an IP address issued by router. I can browse, use apt-get etc. from the phone. But other devices on my home network do not see it nor can ping it.
So, ping return Destination Host Unreachable .

ssh says ssh: connect to host 192.168.2.249 port 22: No route to host

I did a reflash of phone. Am kind of stuck right now, is this a network-manager issue, firewall issue (there is no firewall on the phone)?

1 Like

What is the IP issued by the router?

If it is not 192.168.2.249, USE THE IP issued by the router!

You are extremely stingy witch actual details.

1 Like

ip a command produces a lot of output which I cannot copy - paste here. Here is the main content that has IP address
inet 192.168.2.249/24 brd 192.168.2.255 scope global dynamic noprefixroute wlan0
valid_lft 220571sec preferred_lft 220571sec

This I believe is the IP4 address issued by the router for the librem 5 phone.

1 Like

Here is something more, I restarted the router and it worked. I can ssh into the phone.
But when I restarted the phone the issue is back. It has an IP address issued by router but no other devices in the network can ping the phone.

1 Like

I understand and also know that must be really frustrating.

I am more familiar with the output of ifconfig than ip, which is particularly confusing to me. In any case, a few lines above

inet 192.168.2.249/24 brd 192.168.2.255 scope global dynamic noprefixroute

will be a line like:

wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

(My laptop has wlp1s0:)
The various “UP” are the key. If any of them are “DOWN”, that is bad news.

Your router should have a page at http://192.168.2.1/ and you should be able to get to a page that lists all DNS clients and whether they are currently connected.

1 Like

Thank you for a detailed answer.
There are total five interfaces
lo : LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state unknown group default qlen 1000
wwan0 : POINTPOINT, MULTICAST, NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
lxcrb0 : NO-CARRIER, BROADCAST, MULTICAST, UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
usb0 : NO-CARRIER, BROADCAST, MULTICAST, UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 192.168.2.249/24 brd 192.168.2.255 scope global dynamic noprefixroute wlan0
valid_lft 220571sec preferred_lft 220571sec

The wwan0 is down so am not able to make calls. wlan0 is UP but it is unreachable via network.

1 Like

I am out of ideas unless it is a firewall thing, which I know nothing about.

1 Like

Thank you for all your inputs. I am stuck so am trying flashing it one more time and will run only pureos. I will not install waydroid as before.
Thanks again

1 Like

I was able to make the ssh work after updating the /etc/ssh/sshd_config.
The Port 22 (line #15) was un-commented and so was the PasswordAuthentication yes (line #58).
It seems to be working after that change. This is interesting as I never made any changes earlier to the sshd_config file. So, not sure what happened.

Another thing, ssh does not resume after suspend. I am not sure if that is a design feature for suspend functionality.

2 Likes