PeterPawn / modfs

modify firmware for NAND-flash based FRITZ!Box routers and install it on such a device
GNU General Public License v2.0
62 stars 15 forks source link

start sshd script? #29

Closed motwok closed 5 years ago

motwok commented 5 years ago

I just wonder why there is a script to start the telnet daemon but non to install and start a sshd.

What is the problem?

PeterPawn commented 5 years ago

The daemon "telnetd" is (also nowadays) part of the BusyBox binary supplied by AVM itself.

Starting it (or better: reactivating support for it) is not a big deal ... to support a SSH daemon, you have to select one first.

My "yf_bin" repo contains both "dropbear" (a heavy modified version for FRITZ!OS, which only supports key-based authentication and uses the FRITZ!Box key (from its SSL GUI) as host key) and the "sshd" from OpenSSH - feel free to use these pre-compiled binaries to make your own SSH daemon up and running.

But it needs some further preparations ... starting with a (secure) storage for the public keys in "authorized_keys". This file has to be "device-specific" (that means, I can't provide it myself, together with "modfs") and it must be ensured, that no unauthorized user may add foreign keys to it. That's not so easy and there are many possible, different approaches.

If you want a more secure shell access, but not the "infrastructure" needed for a SSH daemon, you may consider to use "shellinaboxd" ... the provided version enforces an encrypted (TLS) connection from the used browser and uses the existing user accounts for authentication of shell users (as it the telnet daemon would do).

Sooner or later I'll provide a template for a dynamic package with a SSH daemon ... but not in the near future (and I'd bet, not this year).

If you've no more questions regarding this theme, please close this issue yourself.