[LEDE-DEV] [PATCH] dropbear: Link ssh and scp command to /bin instead of /usr/bin

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Sat Sep 2 05:17:07 PDT 2017



On 02/09/17 02:39, Rosen Penev wrote:
> ssh and scp commands interfere with OpenSSH when installed in /usr/bin .
> 
> One use case is when installing dropbear to get root access when only OpenSSH is available (OpenSSH disallows root password logins). Once dropbear installs, it replaces OpenSSH's executables, even when removed with opkg. OpenSSH must be reinstalled to get them back.
> 
> v2: Fix paths.
> 
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>   package/network/services/dropbear/Makefile | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)

<snip>

>   	$(INSTALL_DIR) $(1)/usr/bin
> -	$(LN) ../sbin/dropbear $(1)/usr/bin/scp
> -	$(LN) ../sbin/dropbear $(1)/usr/bin/ssh
>   	$(LN) ../sbin/dropbear $(1)/usr/bin/dbclient
>   	$(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
> +	$(INSTALL_DIR) $(1)/bin
> +	$(LN) ../sbin/dropbear $(1)/bin/scp
> +	$(LN) ../sbin/dropbear $(1)/bin/ssh
>   	$(INSTALL_DIR) $(1)/etc/config

Unfortunately this still has issues, namely scp & ssh no longer work on 
the device and (in my tests) scp to the device also failed.  The 
symbolic links for /bin/scp & /bin/ssh point to '../sbin/dropbear' - 
dropbear is actually in '/usr/sbin/dropbear'.  The following appears to 
work, but could do with a lot more testing/checking.

+       $(LN) ../usr/sbin/dropbear $(1)/bin/scp
+       $(LN) ../usr/sbin/dropbear $(1)/bin/ssh


Cheers,

Kevin



More information about the Lede-dev mailing list