Running ssh server

Hello there,

I have been trying to run openbsd-sshd server on the Librem 5 phone runing PureOS.

No luck so far. I am starting the service and I see the socket open on port 22.

But when I try to reach out to that phone LAN IP port 22 I just get a timeout.

I will keep on trying to find where is the issue.

Anyone ran sshd server on the phone with success?

1 Like

Update on this.

Looks like that the phone is not answering to arp request.

Here is a ping from a pc to the phone

tcpdump -n -i ens130 host 192.168.150.129
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens130, link-type EN10MB (Ethernet), capture size 262144 bytes

14:33:30.988506 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:33:32.017909 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:33:33.041960 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:33:34.066056 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:33:35.089945 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:33:36.113931 ARP, Request who-has 192.168.150.129 tell 192.168.150.253, length 28
14:34:36.368881 ARP, Request who-has 192.168.150.253 tell 192.168.150.129, length 46

And then I did a ping from the phone to that PC 192.168.150.253 which added the phone MAC address to the PC arp table, and the PC was able to reach out to the phone after and ssh worked from PC to phone.

1 Like

Interesting, I have the same behaviour on my jolla, and I blame powersaving settings in the wireless card/driver. I never got time to troubleshoot it in details though.

If that is the only problem then you could try adding a static ARP entry on your PC.

That certainly sounds like a plausible line of investigation.

Fairly obviously a device where power consumption is critical and time on standby is an important attribute, operating as a server is not ideal, and may not be compatible with the current implementation.

Would need to look at selected powersave mode, state of the device on the host (i.e. on the phone itself c.f. the WiFi card) and technically at your wireless access point settings (defaults will very likely be fine but if you have set something weird …) and associations.

I note that I can’t ping my existing spyphone from my PC when the phone is asleep.

2 Likes

Try running in terminal:

sudo systemctl start ssh

And try again

1 Like

This is using a VM and not the actual phone, so your mileage may vary, but I can confirm that simply running sudo systemctl start ssh like kop316 said and then sshing in from a PC worked for me.

A case of

?

2 Likes

that eventually was my quick and dirty workaround where i just hardcoded static arp entry and short dns alias to ssh to the phone from development laptop (to push/debug apps). And as there’s nothing more permanent than temporary that’s how it still is :slight_smile:

1 Like

Yes it’s exactly this great. I will get patched when I get the upstream packages :slight_smile:

Thanks @kop316 I already started ssh this way and I also systemctl enable ssh

See above purism already have a patch for this which I hope will be pushed soon. The issue hapens even before ssh, at the layer 2.

After a full update and reboot I dont get this issue…

I see that the redpine driver with patch got merged recently so maybe I was a bit out-dated.

here is what I have now

modinfo redpine_91x
filename:       /lib/modules/5.3.0-librem5-h1/kernel/drivers/net/wireless/redpine/redpine_91x.ko
license:        Dual BSD/GPL
version:        RS9116.NB0.NL.PURISM.LNX.1.3
description:    Station driver for RSI 91x devices
author:         Redpine Signals Inc
srcversion:     607BBCA4E0EF50BB9DFB3CD
depends:        mac80211,bluetooth,cfg80211
intree:         Y
name:           redpine_91x
vermagic:       5.3.0-librem5-h1 SMP preempt mod_unload aarch64
parm:           bt_rf_type:byte
parm:           ble_tx_pwr_inx:byte
parm:           ble_pwr_save_options:byte
parm:           bt_rf_tx_power_mode:byte
parm:           bt_rf_rx_power_mode:byte
parm:           peer_dist:
1 Like

Good to know! I will have to update and see is this also helps the WiFi Issues I have been having.

1 Like

Hum I saw it again yesterday, oh well :slight_smile: