Dropbear

From Groll Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (14:29, 4 March 2008) (edit) (undo)
 
Line 8: Line 8:
===Installing dropbear===
===Installing dropbear===
-
* Download current version (0.50) of dropbear compiled for pch-a100 [http://groll.troll.free.fr/files/dropbear-0.50-nmt.tgz dropbear-0.50-nmt.tgz]
+
* Download current version (0.50) of dropbear binaries compiled for pch-a100 [http://groll.troll.free.fr/files/dropbear-0.50-nmt.tgz dropbear-0.50-nmt.tgz]
* Login into pch-a100 using telnet (see [http://www.lundman.net/wiki/index.php/NMT:telnetd Lundman Wiki] for how to enable telnet)
* Login into pch-a100 using telnet (see [http://www.lundman.net/wiki/index.php/NMT:telnetd Lundman Wiki] for how to enable telnet)
* Install dropbear on the hard disk
* Install dropbear on the hard disk
cd /mnt/syb8634
cd /mnt/syb8634
tar xvfz dropbear-0.50-nmt.tgz
tar xvfz dropbear-0.50-nmt.tgz
 +
 +
===Configurate dropbear===
 +
For the configuration tasks, I will not publish the unix commands because I think that if you can't do it by yourself you should
 +
probably not use dropbear.
 +
====Things to do once====
====Things to do once====
In order to log on the pch-a100 using ssh server you must define a password for root (or another user) as there is no default password set.
In order to log on the pch-a100 using ssh server you must define a password for root (or another user) as there is no default password set.
-
We also create a presistant writable root home dir on the hard disk to keep configurations files
+
We also create a persistant writable root home dir on the hard disk to keep configurations files
* Create a writable root home (optional)
* Create a writable root home (optional)
-
mkdir -p /mnt/syb8634/home/root
+
 
-
 
+
* Generate server keys in a persistant dir
* Generate server keys in a persistant dir
-
mkdir /mnt/syb8634/etc/dropbear
+
 
-
dropbearkey -t rsa -f /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key
+
-
dropbearkey -t dss -f /mnt/syb8634/etc/dropbear/dropbear_dss_host_key
+
-
 
+
====Things to do at each startup====
====Things to do at each startup====
-
Most of system file are reset at the pch-a100 boot. So we must modify some of these system files after each boot to allow ssh login
+
Most of system file are reset at the pch-a100 boot. So we must modify some of these system files after each boot to allow ssh login.
* Add root password and define root home
* Add root password and define root home
-
sed -i 's/root:[^:]*:/root:'''yourBackslashedEncryptedPassword''':/' /etc/shadow
+
 
-
sed -i 's/\/root:\/bin\/true/\/mnt\/syb8634\/home\/root:\/bin\/sh/' /etc/passwd
+
-
 
+
-
 
+
* Add dropbear command in one of the startup scripts in /mnt/syb8634/etc
* Add dropbear command in one of the startup scripts in /mnt/syb8634/etc
-
/mnt/syb8634/sbin/dropbear -d /mnt/syb8634/etc/dropbear/dropbear_dss_host_key -r /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key
+
 

Current revision

Contents


Enabling SSH

Dropbear SSH server is a lightweight SSH2 server (and client) which is particularly usefull for little linux based device like the pch-a100. The following explain how to install and configure dropbear on the pch-a100 internal hard disk. Some modifications must me made to use it without a hard disk.

Installing dropbear

  • Download current version (0.50) of dropbear binaries compiled for pch-a100 dropbear-0.50-nmt.tgz
  • Login into pch-a100 using telnet (see Lundman Wiki for how to enable telnet)
  • Install dropbear on the hard disk
cd /mnt/syb8634
tar xvfz dropbear-0.50-nmt.tgz

Configurate dropbear

For the configuration tasks, I will not publish the unix commands because I think that if you can't do it by yourself you should probably not use dropbear.

Things to do once

In order to log on the pch-a100 using ssh server you must define a password for root (or another user) as there is no default password set. We also create a persistant writable root home dir on the hard disk to keep configurations files

  • Create a writable root home (optional)
 
  • Generate server keys in a persistant dir
 

Things to do at each startup

Most of system file are reset at the pch-a100 boot. So we must modify some of these system files after each boot to allow ssh login.

  • Add root password and define root home
 
  • Add dropbear command in one of the startup scripts in /mnt/syb8634/etc
 
Personal tools