WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dropbear.scm  (Read 13860 times)

Offline yuanlixg

  • Newbie
  • *
  • Posts: 3
dropbear.scm
« on: March 03, 2013, 03: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]"
« Last Edit: March 03, 2013, 03:21:32 AM by yuanlixg »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: dropbear.scm
« Reply #1 on: March 03, 2013, 12:02:58 PM »
I will take a look at it, thanks.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: dropbear.scm
« Reply #2 on: March 06, 2013, 05:50:35 PM »
Hi,
Can I get you to put this in patch form so I don't mess it up.  Thanks.
JW

Offline yuanlixg

  • Newbie
  • *
  • Posts: 3
Re: dropbear.scm
« Reply #3 on: March 06, 2013, 06:50:21 PM »
« Last Edit: March 07, 2013, 03:40:30 PM by yuanlixg »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: dropbear.scm
« Reply #4 on: March 07, 2013, 04:44:27 AM »
Please use patches.tinycorelinux.net instead of pasting here, thanks.
The only barriers that can stop you are the ones you create yourself.

Offline MapHtH

  • Newbie
  • *
  • Posts: 36
Re: dropbear.scm
« Reply #5 on: April 04, 2013, 02:55:37 AM »
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
« Last Edit: April 04, 2013, 03:05:50 AM by MapHtH »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: dropbear.scm
« Reply #6 on: April 04, 2013, 03:20:11 AM »
Hi MapHtH
What does this command return:
Code: [Select]
ls -l /apps/dropbear/etc/init.d/dropbear

Offline MapHtH

  • Newbie
  • *
  • Posts: 36
Re: dropbear.scm
« Reply #7 on: April 04, 2013, 03: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...
« Last Edit: April 04, 2013, 03:37:03 AM by MapHtH »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: dropbear.scm
« Reply #8 on: April 04, 2013, 08: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.
;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: dropbear.scm
« Reply #9 on: April 04, 2013, 09: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. 

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: dropbear.scm
« Reply #10 on: April 04, 2013, 10: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
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)