tl;dr
We have an embedded linux (PTXdist) device connected to a 4G router. If we try to SSH to that device over the 4G link, the connection drops immediately after showing a shell prompt.
More detail:
We are using an embedded linux device (running PTXdist) that sits behing a 4G router.
PTXdist uses dropbear for SSH support. There is a port forwarding rule on the router that forwards incoming SSH connections on external port 4022 to port 22 on the PTXdist device.
+-------------------+ +--------------+
| Device |________| Teltonika |________ Internet
| (running PTXdist) | | 4G router |
+-------------------+ +--------------+
The problem we are having is that all SSH connections we make through the router (ie over the 4G link) to the device are dropping immediately after successfully connecting. We see the shell prompt, and maybe have time to type a few characters, before the connection freezes. The device then refuses any more connections until we reset it.
Things we've tried:
- we've tried two different routers
- we can SSH fine to the device from another device on the router's internal network
- we can SSH successfully over the 4G link to a different device on the internal network
It seems there is something wrong with the configuration of the device. I've checked and there doesn't seem to be any firewall or iptables rules on the PTXdist device that would affect SSH connections.
My experience with PTXdist and dropbear configuration is nil. So I am hoping that someone can suggest where I should be looking next to find the cause of this problem? Thanks in advance.