Dropbear
From Groll Wiki
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 make 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
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 make 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:yourencryptedpassword:/' /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