Tomato shfs

Discussion in 'Tomato Firmware' started by redcow, Sep 18, 2006.

  1. redcow

    redcow LI Guru Member


    I dont know if somebody needs it but I searched very hard to find a working shfs kernel module and toolkit to use the "(Secure) SHell FileSystem" and I never found a working one, not for ddwrt or for any other firmware, only openwrt seems to have a working one, so I tried to build my own for tomato 04 but should also work for 03.

    WARNING: Its experimental, it seems to work, but its your risk.

    about shfs:


    # cd /tmp [b](or another writable directory)[/b]
    # tar xzvf shfs-0.35_tomato.tar.gz
    [/i]# insmod shfs-0.35_tomato/modules/shfs.o
    # dmesg|grep SHell
    [i]<5>SHell File System, (c) 2002-2004 Miroslav Spousta[/i] [b](seems to have loaded ;-))[/b]
    [b]to mount the remote "ssh/directory"[/b]
    # ./shfs-0.35_tomato/bin/shfsmount username@host:/directory /directory_as_mountpoint
    Can't get /etc/mtab~ lock file#[/i] 
    [b](the error is only because /etc/mtab is not writable, shfsmount/umount has only to be modified to use /tmp/etc/mtab you canavoid the mtab update with the [u]-n[/u] parameter)[/b]  
    [b]to umount the remote "ssh/directory"[/b]
    # ./shfs-0.35_tomato/bin/shfsumount /directory_as_mountpoint
    [i]Can't get /etc/mtab~ lock file#[/i] 
    You could also wget the bins at the router's startup into the ramdisk (/tmp), insmod the module mount the directory and after that delete everything to save space.


    have fun :thumbup:
  2. bokh

    bokh Network Guru Member


    Much appreciated!
    Now let's find a use for this beside my CIFS-client...
  3. redcow

    redcow LI Guru Member

    I don't know if I misunderstood you or you me, but it has nothing do do with samba/CIFS. It allows you to extend your free space using a normal user account with ssh instead of samba, i prefer this way because i have access to a few shell accounts but no 24/7h running samba server, furthermore you can get easy, shells for free (, try to find a 24/7h running samba server/account for free (not yours :tongue: ) :wink:
  4. bokh

    bokh Network Guru Member

    Oh no, I perfectly understand what you mean :)

    But it is just another way of using a filesystem on a WRT, next to JFFS2 and CIFS, right? Only this way around it's pretty much secure.
  5. redcow

    redcow LI Guru Member

    yeah, well than lets enjoy tomato :biggrin:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice