OpenWrt Forum Archive

Topic: SSH to router not working under the "extroot"

The content of this topic has been archived on 28 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

CC 15.05.1 here (on Asus WL-330N3G with Huawei E3131 USB-modem).

When I manually (from CLI) enable the extroot configuration with a miniSDHC inserted in the modem's slot - the router works just fine: the 3G connection is properly shared with router's clients, the SSH is working to the router.

If the extroot is activated and router boots up into it - the router keeps working OK (just as before) but I can't connect to it with SSH.

What could be a problem here?

Check for the presence and correct value(s) of /overlay/upper/etc/dropbear/authorized_keys on the extroot storage.

Thank you, I'll have a look at it.

Right now I was on password auth still - no key auth was implemented yet.
Is it about the server's own key?

Since I was always using the password auth for SSH - there is no /etc/dropbear/authorized_keys file on the original file system, therefore it is also absent on the extroot storage.

What else should I look for?

The /mnt/upper/etc/dropbear/dropbear_dss_host_key and /mnt/upper/etc/dropbear/dropbear_rsa_host_key files exist if I mount the /dev/sda1.

The message when I try to SSH to the extrooted router is:
ssh: connect to host 192.168.1.1 port 22: Connection refused

What can that mean? A firewall's fault?

If I do

ssh root@192.168.1.1 -p 23

the response is:
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
Login failed.
Connection closed by foreign host.

Looks like nobody is listening on SSH port because of the "refused vs closed' difference.

(Last edited by booBot on 31 Mar 2016, 15:05)

Hints and the solution are here.
I must update the WiKi when I finish this properly.

The discussion might have continued from here.