Current Situation
OpenWrt Default user name is root, but the default is no password, so SSH is not turned on by default, but Telnet is used without password, when the root password is set, then ssh on, telnet off. And the convenience of SSH is more than telnet,telnet in the case of product testing and use, so there is no way to let the two coexist?
Step One
Modify the Telnet self-launch script to remove the password and SSH-related judgments, as follows
start() {# if ( ! has_ssh_pubkey && \# ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \# ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );# then service_start /usr/sbin/telnetd -l /bin/login.sh# fi}
This allows you to start Telnet when the/etc/init.d/telnet restart is executed, but you will be prompted for login when you connect faild
Step Two
The above connection error is shown in the/bin/login.sh script, open the file, delete the relevant judgment. Finally, leave one line of exec's line.
If you need to log in to the user name password when connecting to Telnet, change the last line to the following
exec /bin/login
In addition, by default, let the firmware enable SSH by default, set the default password method of firmware look at the blog:
http://blog.csdn.net/jk110333/article/details/8814675
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
OpenWrt let Telnetl and ssh (dropbear) coexist