Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
General installation notes
Entware-3x system library is specially modified (patched) so that standard linux files that are normally located in
/etc folder are now located in
/opt/etc/folder. To simplify things let's consider /etc/passwd file. It normaly looks something like
This file has user names, encrypted paswords and other information.
We call standard Entware installation the case, when /opt/etc/passwd (shadow,group,gshadow,shells) files are symbolic links to the equivalent files in /etc folder. When Entware binaries need to access /opt/etc/passwd file they accesse /etc/passwd file. This is equivalent of Entware-ng behavior.
We call alternative Entware installation the case when /opt/etc/passwd and /opt/etc/group are real files (not symlinks). Entware binaries use user? group names, passwords from these files. They can be different from firware ones. The original firmware has admnin as a superuser, Entware has always root as a superuser. Alternative installation is more flexible, but need a little more understanding what is going on. We recommend to install Entware ssh server in this case. The superuser root has password 12345 that can be changed after the first login and is independent from system firmware.
General installation scripts are here
There are two ssh servers in Entware - dropbear and openssh. Dropbear is installed by
opkg install dropbear command. You need to edit
/opt/etc/init.d/S51dropbear startup script and change the line
ARGS="-p 22 -a" to
ARGS="-p 2222 -a" to make dropbear ssh port different from the system's one. Openssh is installed by
opkg install openssh-server command. You need to run more commands:
ssh-keygen -A to generate keys and
adduser -h /opt/tmp -s /opt/bin/false -D -H sshd to add sshd user. You also need to edit
/opt/etc/ssh/sshd_config file and change the lines
#Port 22 to
Port 2222 and
#PermitRootLogin prohibit-password to
PermitRootLogin yes to alow root logins.
ssh servers start automatically when your device reboots. To start dropbear or openssh server for the first time use
/opt/etc/init.d/S51dropbear start or
/opt/etc/init.d/S40sshd start command.