dropbear ssh+passwd

binary_dreamer

Neuer User
Mitglied seit
24 Jul 2009
Beiträge
170
Punkte für Reaktionen
0
Punkte
16
hi.
i installed in FBF7140 dropbear and i am trying to figure out where is the passwd and how to change it to desired one.
any ideas?
 
The dropbear uses the PW-hash in "/etc/shadow" .
If you don't know how to generate it, you may try the dropbear package from speed2fritz which has a small new extension "pwcrypt" to generate such a hash, eg to set root-PW like this:
Code:
CRYPT=$(pwcrypt <your new password for root>)
echo "root:${CRYPT}:12332:0:99999:7:::" > /etc/shadow

Jörg
 
hi.
i am kinda stuck on what to do to find/generate the passwd. also how do i install the software that you have mentioned on FBF 7140?
sorry, but i am really stuck at the moment
 
Then let's start the other way round: How did you install dropbear on your box?
 
i followed the guide from
http://www.ip-phone-forum.de/showthread.php?t=146132
and i did
-----------------------------------
to install asterisk
cd /var
wget http://www.spblinux.de/fbox.new/cfg_asterisk16
chmod +x ./cfg_asterisk16
./cfg_asterisk16 usb_install


and to install dropbear i did
cd /var
wget http://www.spblinux.de/fbox.new/cfg_dropbear
chmod +x ./cfg_dropbear
./cfg_dropbear usb_install
------------------------------------------------------
the thing is that i have to type dropebear in order for the server to start and after a reboot i have to reinstall.
but first things first i cannot find the username and passwd for the ssh
 
I see. If you want to use this script, you maybe better ask in the thread of the script, which is quite long and for the author it will be much easier to explain it ;-).

"My" idea was you changed the "dropbear" binary with the one from the package mentioned above, then this binary would have the additional possibility to call it as "pwcrypt".

Jörg
 
hi.

first of all i would like to thank you for your time.
is it possible to point me to the right direction since i am lost in the forum.
i am searching for some time now without success.
 
i think there was no special topic for that.

I also think that spblinux is currently not so good available. I haven&acute;t read a message here in the forum for a long time. The last was from "12.04.2009".

Maybee he will read this topic here.
 
hi.
anybody to help on setting up the passwd for ssh?
or even get the ssh from scratch as long someone to guide me where to start.
 
Hi,

I tried to modify the dropbear-package so you should be able to use it with an USB stick.

- Copy the dropbearusb.tar to your USB stick
- start the following script to unpack it
Code:
#!/bin/sh
DROPB=$(find /var/media/ftp -name dropbearusb.tar)
echo "Found dropbear tar-file at $DROPB - extracting to /var/tmp"
tar xvf $DROPB -C /var/tmp
echo "done"
cd /var/tmp/dropbear
./dropbearstart

First-time this will fail, because you have no password defined yet. So you once need to start it in /var/tmp/dropbear with "dropbearstart <your root password>". It will generate keys and a password and then tar all the files together again. So you have to replace the dropbearusb.tar on your stick with the new generated one in /var/tmp, witch will include your keys and the crypt of the root-passphrase.

So after the first run (and replacing the tar with your individual one) the above script should start your dropbear with the desired password.

You might put the above skript into debug.cfg to start it every time the box starts, maybe you will have to delay it to make sure, the USB device is ready. If you have no other entries in debug.cfg, this should suit your needs (I have no clue whether waiting 20 seconds is o.k., less or much too long, but you may alter it to your needs)
Code:
cat << 'EOF' > /var/flash/debug.cfg
(sleep 20
DROPB=$(find /var/media/ftp -name dropbearusb.tar)
echo "Found dropbear tar-file at $DROPB - extracting to /var/tmp"
tar xvf $DROPB -C /var/tmp
echo "done"
cd /var/tmp/dropbear
./dropbearstart ) &
EOF
Jörg
 

Anhänge

  • dropbearusb.tar
    590 KB · Aufrufe: 12
Hi.
it seems to work OK for dropbear. i have put the script
sleep 50
DROPB=$(find /var/media/ftp -name dropbearusb.tar)
echo "Found dropbear tar-file at $DROPB - extracting to /var/tmp"
tar xvf $DROPB -C /var/tmp
echo "done"
cd /var/tmp/dropbear
./dropbearstart

into /var/flash/debug.cfg




before dropbear i had the following script into /var/flash/debug.cfg
sleep 30
cd /var/media/ftp/Generic-USBDisk-01/addons
./cfg_asterisk16 usb_install
./cfg_asterisk16 start
which after dropbear that script goes away.
do u happened to have any idea why?
currently my /var/flash/debug.cfg looks like

# more /var/flash/debug.cfg
sleep 50
DROPB=$(find /var/media/ftp -name dropbearusb.tar)
echo "Found dropbear tar-file at $DROPB - extracting to /var/tmp"
tar xvf $DROPB -C /var/tmp
echo "done"
cd /var/tmp/dropbear
./dropbearstart
#####################################################################
sleep 30
cd /var/media/ftp/Generic-USBDisk-01/addons
./cfg_asterisk16 usb_install
./cfg_asterisk16 start
#####################################################################

#
but the second script does not work!
 
So, dropbear is working, with the newly set password?

Then you might try to execute the script "by hand" to see if you get some errors:

Code:
. /var/flash/debug.cfg
# or maybe prior "adjust" the sleeps a bit:
sed 's/sleep .*/sleep 2/' /var/flash/debug.cfg > /var/tmp/mydebug.cfg 
.  /var/tmp/mydebug.cfg

Jörg
 
Hm, did I get something wrong? I just stumbled upon this thread. I have installed dropbear from the same source (spblinux) on my FB yesterday.

I was able to set the password with "passwd" just out of the box. Also, the package had the option to be install on a usb device (./cfg_dropbear usb_install).

The only trouble I had involved key file authentication. The authorized_keys file and it's containing directory must not allow reading to group and others but by default they did.
 

Statistik des Forums

Themen
246,149
Beiträge
2,246,978
Mitglieder
373,668
Neuestes Mitglied
Stripi
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.