SSH stops after battery level is low

This does not make sense. Read the comment in the config file:

  8 # The strategy used for options in the default sshd_config shipped with
  9 # OpenSSH is to specify options with their default value where
 10 # possible, but leave them commented.  Uncommented options override the
 11 # default value.
 12 
 13 Include /etc/ssh/sshd_config.d/*.conf
 14 
 15 #Port 22
...
 57 # To disable tunneled clear text passwords, change to no here!
 58 #PasswordAuthentication yes
 59 PasswordAuthentication no

i.e. I set the value of line 58 from yes (default) to no to permit only RSA key logins.

Try installing and run local in the L5 in a terminal

tcpdump -i wlan0 -n port 22

to see if the connect reaches port 22 at all.

2 Likes

@guru , Thanks for your inputs. With the changes I made, it seems to be working as expected. So, I do not want to continue further troubleshooting.

Thanks, again.

1 Like

If it is working, I agree that it is not worth risking breaking it again.

But I donā€™t think your changes to the config file affected whether your previous problem was fixed, or really anything.

Port 22 is the default port for ssh and whether or not password login is enabled has no effect on a ā€œno route to hostā€ error.

1 Like

And also ā€œno route to hostā€ is unaffected by the port number (unless maybe someone is running an exotic kernel or the OPā€™s network is more complex than we realise).

1 Like

As I (and others) said, the changes you did are just a NOP (from the old good days of IBM /360 assembly language, a NOP is often represented as an instruction that literally does nothing).

Of course, youā€™re free to not to continue further troubleshooting. And, just as a hint of my 45 years of computer experience: unsolved and not understood problems will return, and often in the moment less desired.

1 Like

:+1:

If you donā€™t know why it happened, you canā€™t be sure you fixed it. And if you canā€™t be sure you fixed it, it can come back.

1 Like

Agreed with your point. I tried as you suggested. I let the battery go low to see if the issue reappears and it did. So, as you mentioned the changes I made did not resolve the issue. I would say they were mere work-around approaches.

I used the tcpdump command as you had mentioned. There is no traffic coming to the port when I attempt an ssh with low battery.

1 Like

Is SSH outbound still working in this moment? You could try

ssh -vv www.unixarea.de

if you donā€™t have any SSH server to connect.

On your SSH client system, can you run the same tcpdump (or wireshark if it is a Windoze box). Are there outbound SSH SYN pkg answered? I suspect not.

2 Likes

Outbound ssh from the client system is working. I can ssh to my raspberrypi from the my manjaro laptop which is my ssh client system. But ssh to Librem 5 is not working. So, ssh client seems working fine.

1 Like

They wer not even that. Something else got it working again.

1 Like

And what does tcpdump show on the client when you SSH to the L5?

1 Like

There is no update after the initial messages on screen. It is just waiting ((I do not have that message with me. I will try to capture it next time)

Something more to add, the phone had very low battery this morning when SSH did not work. Now, the battery is around 95%+ and it is working. I did not make any change nor did i restart the SSH process or any such thing. It just worked when I did a SSH from my client machine.

1 Like

The output of the route command (no arguments) when it is working and when it is not working might be illuminating.

1 Like

I see these messages before the SSH client throws the following error;

SSH Client

debug1: Connecting to 192.168.2.249 [192.168.2.249] port 22.
debug1: connect to address 192.168.2.249 port 22: No route to host

Librem 5 screenshot

1 Like

Can you please gather the output of tcpdump into a file and attach this here. The screen shows that

  • the L5 received a SYN pkg on port 22
  • the L5 replied with a SYN and repeated this

Please run the tcpdump on both sides at the same time and attach both files.

What is the client side for a system? When the SSH does not work, is PING to the IP addr 192.168.2.249 still working?

1 Like

ping does not work on both Librem 5 and my laptop when SSH is not working.

Something more to add, this issue occurs only after I install waydroid. With no waydroid, ssh works fine even after i bring the phone back to network from suspend mode.

1 Like

So, Iā€™m out of this. I have no idea what should or could do this piece of software (which I do not use and do not need) with your network stack. Sorry.

1 Like

No worries, Thank you for all your inputs. I will try to figure out what can be done. Thanks again

1 Like

I still think the output of /sbin/route both when ssh isnā€™t working and when it is working can help. The output is usually pretty simple and most of it easy to interpret.

On one of my computers, it is:

$ /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.2.1    0.0.0.0         UG    0      0        0 eno1
localnet        0.0.0.0         255.255.255.0   U     0      0        0 eno1

where 192.168.2.1 is the IP address of my router.

There is a chance that when ssh isnā€™t working, the default gateway or something else has changed.

1 Like

Client Machine

> /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         mynetwork.home  0.0.0.0         UG    600    0        0 wlp4s0
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

Librem 5

> /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         mynetwork.home  0.0.0.0         UG    600    0        0 wlan0
192.168.2.0     0.0.0.0         255.255.255.0   U     600    0        0 wlan0

2 Likes