SSH daemon on the EdMini v2

From NAS-Central Lacie Wiki
Jump to: navigation, search

Unfortunately as far as I know there is no way to get a ssh daemon running without opening the box, or without already having a shell.

Here are instructions to install dropbear (a lightweight ssh daemon and client).

Download and unzip the zipfile. The zipfile contains a dropbear.tgz file, and two private keys, one for ssh, and one for PuTTY.

When you already have a shell, just untar the dropbear.tgz in the root (you need to be root),

cd /
tar -xzf /full/path/to/dropbear.tgz

and execute

/etc/init.d/dropbear.sh start 

or reboot the box.

When you don't have a shell, get the harddisk out of the box, and connect it to a Linux PC. Execute

cat /proc/partitions

to find out de names of the partitions. You are searching for a drive which has the partition sdx1, sdx2, sdx5, sdx6, sdx7, sdx8 and sdx9, where x is some character. Now you have the choice, you can unpack the packet to the root of partition8, or unpack it to partition9/snaps/NN, where NN is the directory with the highest number. When you unpack it to partition8, ssh will survive a factory reset, when unpacked to partition9 the packet will be gone after a factory reset. It's up to you to decide which is best.

You'll need to be root to install. On some distro's type 'su' to become root, on others 'sudo su'.

For partition8:

mkdir /tmp/sdx8
mount /dev/sdx8 /tmp/sdx8
cd /tmp/sdx8 
tar -xzf /full/path/to/dropbear.tgz
cd
umount /dev/sdx8

For partition9:

mkdir /tmp/sdx9
mount /dev/sdx9 /tmp/sdx9
cd /tmp/sdx9/snaps
ls # to find the highest number
cd NN
tar -xzf /full/path/to/dropbear.tgz
cd
umount /dev/sdx9

Put the drive back in the EdMini.

Now you can connect to the EdMini using ssh:

ssh -i /full/path/to/EdMini.key root@<ip-of-edmini>

or using putty:

putty -i /full/path/to/EdMini.ppk -ssh root@<ip-of-edmini>

Oh, by the way, this package is a slightly adapted version (startscript and public key) of the dropbear package of ffp 0.4. I didn't test it, but maybe the other 0.4 packages also work on the EdMini V2