Dropbear

From Groll Wiki

(Difference between revisions)
Jump to: navigation, search
(Things to make at each startup)
Line 13: Line 13:
cd /mnt/syb8634
cd /mnt/syb8634
tar xvfz dropbear-0.50-nmt.tgz
tar xvfz dropbear-0.50-nmt.tgz
-
====Things to make 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 presistant writable root home dir on the hard disk to keep configurations files
-
* create a writable root home
+
* Create a writable root home (optional)
mkdir -p /mnt/syb8634/home/root
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
mkdir /mnt/syb8634/etc/dropbear
dropbearkey -t rsa -f /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key
dropbearkey -t rsa -f /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key
Line 26: Line 26:
-
====Things to make 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:'''yourencryptedpassword''':/' /etc/shadow
+
sed -i 's/root:[^:]*:/root:'''yourBackslashedEncryptedPassword''':/' /etc/shadow
sed -i 's/\/root:\/bin\/true/\/mnt\/syb8634\/home\/root:\/bin\/sh/' /etc/passwd
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
/mnt/syb8634/sbin/dropbear -d /mnt/syb8634/etc/dropbear/dropbear_dss_host_key -r /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key

Revision as of 14:11, 4 March 2008

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 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

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 presistant writable root home dir on the hard disk to keep configurations files

  • Create a writable root home (optional)
mkdir -p /mnt/syb8634/home/root
  • 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

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
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
/mnt/syb8634/sbin/dropbear -d /mnt/syb8634/etc/dropbear/dropbear_dss_host_key -r /mnt/syb8634/etc/dropbear/dropbear_rsa_host_key
Personal tools