Tiny Core Linux

Off-Topic => Archive / Obsolete => SCM EXtensions => Topic started by: yuanlixg on March 03, 2013, 12:06:04 AM

Title: dropbear.scm
Post by: yuanlixg on March 03, 2013, 12:06:04 AM
dropbear.scm (ver 2012.55)

file '/apps/dropbear/etc/init.d/dropbear':
if /apps/dropbear/bin/dropbear "$OPTIONS"; then

sleep 2
/apps/dropbear/bin/dropbear "$OPTIONS"

echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart|status]"

maybe:
if /apps/dropbear/bin/dropbear $OPTIONS ; then

sleep 2
/apps/dropbear/bin/dropbear $OPTIONS

echo -e "\033[1mUsage:\033[0m /apps/dropbear/etc/init.d/`basename $0` [start|stop|restart|status]"
Title: Re: dropbear.scm
Post by: Jason W on March 03, 2013, 09:02:58 AM
I will take a look at it, thanks.
Title: Re: dropbear.scm
Post by: Jason W on March 06, 2013, 02:50:35 PM
Hi,
Can I get you to put this in patch form so I don't mess it up.  Thanks.
JW
Title: Re: dropbear.scm
Post by: yuanlixg on March 06, 2013, 03:50:21 PM
patch file:
http://patches.tinycorelinux.net/uploaded/dropbear.scm_dropbear.patch (http://patches.tinycorelinux.net/uploaded/dropbear.scm_dropbear.patch)

Sorry, my english is poor.
Title: Re: dropbear.scm
Post by: curaga on March 07, 2013, 01:44:27 AM
Please use patches.tinycorelinux.net instead of pasting here, thanks.
Title: Re: dropbear.scm
Post by: MapHtH on April 03, 2013, 11:55:37 PM
I have a problem with dropbear.scm where it won't start.

It generates the keys and outputs: "Error starting Dropbear"

I downloaded the scm and tried to start it via /apps/dropbear/etc/init.d/dropbear start.

Also, how can I change the port it is using. I have two servers and want to be able to connect from internet to both of them. I can't edit the startup script since it is a part of tcz file and I can't find a configuration file.

Thanks
Title: Re: dropbear.scm
Post by: Rich on April 04, 2013, 12:20:11 AM
Hi MapHtH
What does this command return:
Code: [Select]
ls -l /apps/dropbear/etc/init.d/dropbear
Title: Re: dropbear.scm
Post by: MapHtH on April 04, 2013, 12:32:02 AM
-rwxrwxrwx   1 tc    staff   1775   /apps/dropbear/etc/init.d/dropbear

The old one works, but I'd rather use the scm version.

I've also figured out how to change the port.

EDIT: Nevermind. I've made a script to start it that applies the patch yuanlixg suggested.

Thanks for a speedy response...
Title: Re: dropbear.scm
Post by: tinypoodle on April 04, 2013, 05:12:16 AM
Also, how can I change the port it is using. I have two servers and want to be able to connect from internet to both of them.

You can connect to multiple ssh servers running on port 22 as much as you could connect to multiple http servers running on port 80.
;)
Title: Re: dropbear.scm
Post by: Jason W on April 04, 2013, 06:17:16 AM
I applied the patch, but it appears that dropbear.scm will have to be rebuilt due to a hardcoded path requiring /usr/bin/dhclient when using scp. 
Title: Re: dropbear.scm
Post by: tinypoodle on April 04, 2013, 07:55:51 AM
As a temporary workaround, creating a symlink named dbclient pointing to dropbearmulti and executing scp with '-S' option explicitely specifying the path of dbclient symlink could work:

Code: [Select]
tc@box:/tmp/testdb$ mkdir -p mnt/dropbear
tc@box:/tmp/testdb$ sudo mount dropbear.scm mnt/dropbear/
tc@box:/tmp/testdb$ ln -s mnt/dropbear/localbin/dropbearmulti ./dbclient
tc@box:/tmp/testdb$ ./mnt/dropbear/bin/scp -v -S /tmp/testdb/dbclient dropbear.scm user@shell.org:
Executing: program  /tmp/testdb/dbclient host shell.cjb.net, user user, command scp -v -t .
WARNING: Ignoring unknown argument '-v'
user@shell.org's password:
Sending file modes: C0644 118784 dropbear.scm
Sink: C0644 118784 dropbear.scm
tc@box:/tmp/testdb$

tc@box:~$ ssh -i .ssh/dropbear_id_rsa user@shell.org ls -l drop*
-rw-r--r--  1 user  users  118784 Apr  4 08:49 dropbear.scm