Caanoo-Dropbear : Ssh2 And Sftp Server For The Caanoo V0.52-1


zx-81

Certified Guru
Joined
Apr 5, 2007
Messages
679
Age
54
Location
Earth
Website
zx81.zx81.free.fr
caanoo-dropbear.jpg


Hi All,

Dropbear is a small SSH2 Server and Client running on a variety of POSIX-based platforms.
It has been mainly developed by Matt Johnston (see http://matt.ucc.asn.au/dropbear/dropbear.html).

Scachi did a port to the Wiz, and i've recompiled it for the caanoo.

This package include everything from my latest version plus the sftp-server required to use the SFTP protocol (secured FTP).

You can now browse, put or get files using wifi from a PC running for example winscp (see http://winscp.net/eng/download.php ).
The login is root and a blank password.

Here is a full working binary version : on my blog http://zx81.zx81.free.fr/

Enjoy,

Zx.
 
Zx, this is brilliant. Works like a charm. Thanks.

I mount the caanoo on my local machine using sshfs, and can browse the filesystem as if it was local :)

I have noticed though, that copying files is extremely slow. I just tried to copy a 175MB episode of Simpsons. It took 11 minutes. That is about 0.2MB/s. If i plug the SD card into my laptop i can copy at a speed of about 10MB/s.

This is not the fault of dropbear though. It seems, the filesystem on the Caanoo is slow. I have been working on a one-click installer and have the same problem writing files on the Caanoo. It takes forever, and the entire machine locks up while doing it. Any idea why, or any idea what i can do to improve filesystem performance?

/Uni
 
Hi u9i,

I did some experiments months ago to identify why the caanoo was so slow when i tried to scp a file on it.

... ssh caanoo ...
root@caanoo's password:
~ # mkdir -p /mnt/sd/tmp
~ # cd /mnt/sd/tmp
/mnt/sd/tmp # time dd if=/dev/zero of=pwet bs=1024 count=100
100+0 records in
100+0 records out
real 0m 11.88s
user 0m 0.01s
sys 0m 0.05s

Then i've modified the mount options of the SD card :
/mnt/sd/tmp # mount
/dev/mmcblk0p1 on /mnt/sd type vfat (iocharset=utf8,sync,noatime)
/mnt/sd/tmp # mount /dev/mmcblk0p1 /mnt/sd -o remount,dirsync,noatime
/mnt/sd/tmp # time dd if=/dev/zero of=pwet bs=1024 count=100
100+0 records in
100+0 records out
real 0m 0.01s
user 0m 0.00s
sys 0m 0.02s

To overcome this speed issue, i've just modified the autorun script file at the root of my SD card, and add a "mount /dev/mmcblk0p1 /mnt/sd -o remount,dirsync,noatime" command. But be aware, that when you use this mode you must not remove your SD card only when the caanoo is properly shutdown (since the write might be delayed).

Anyway, even using the mount options discussed above, it is still a bit slow, and sometime the menu doesn't respond (flush write) for a minute ...
 
Thanks Zx, it is indeed much faster. It also seems faster at writing. I will do some experiments with this. What would be ideal is if i could control the bursts, maybe with some kind of delayed writing. That way my app-explorer could run smoothly, and i could do writing to sd card while exiting back to menu.

A quick question, i can remount the SD card back to normal settings (probably default options+sync) and before it is remounted it is brought up-to-date, right? I mean, remounting it before everything is physically on the card will not mess up file system integrity?

/Uni
 
I don't see any reason why it won't work. the mount command is secured, and it must not affect the FAT integrity.
 
Note to everyone. Logging in via ssh remember to add -t option otherwise you relaunch the menu when loggin in:

ssh root@caanoo_ip_address -t "/bin/sh"
 
Back
Top