How to install and configure sshfs

Discussion in 'Tomato Firmware' started by frojnd, Nov 15, 2011.

  1. frojnd

    frojnd Networkin' Nut Member

    Hi there!

    I've been reading this forums for a while now. I'm miss tomato wiki which would be as detailed as wiki for dd-wrt or openwrt, but I guess google does it too...

    I've been googling for sshfs and tomato and didn't find anything that would ease my problem so I decided to try my luck here. I own 2 Linksys WRT54GL 1.1 Both have tomato 1.28 installed. One is served as the main router and second as AP. I'd like to monitor my residents on how many GBs are they using. But I don't have any 24/7 local servers with me. I do have however 24/7 server which is somehwhere else. So I'm forced to use sshfs. I was hoping if someone could tell me how to install sshfs on a tomato firmware?

    A side note. Is there any wiki or a list of apps I can install on tomato together with instructions?
  2. frojnd

    frojnd Networkin' Nut Member

  3. Toastman

    Toastman Super Moderator Staff Member Member

    If the aim is to monitor your client's bandwidth usage, why not simply use a version of Tomato that has the Traffic Monitor included?
  4. frojnd

    frojnd Networkin' Nut Member

    Thank you for your fast response Toastman :)I already red a few of your QoS articles and will reply them (in other topics ofcourse).

    Where do I get this version of tomato if I decide to install it? Also even if this version of Tomato has Traffic monitor included I'd need some storage to store at wouldn't I? WRT54GL 1.1 only has a few MB and for storing the bandwith logs or any other logs I need a location where I can save it safely.
  5. mvsgeek

    mvsgeek LI Guru Member

    I have a similar environment (main router, several secondary AP's), here's what I did...

    Bought a bare-bones used Windows (XP Pro) PC on eBay for about $80, configured it as a"headless" file server, connected via cat5 to the main router. I defined a cifs directory on the main router to reference a shared folder on the PC, which then becomes the repository for any statistics, log files, etc. I access the folder using Windows RDP from my house, which is about half a mile from the location of the main router/PC.

    Main router is WRT54gl v 1.1 running Tomato 1.28 vanilla.
    Secondary routers are WRT54gl v1.1 running Toastman 1.28-7625.
  6. frojnd

    frojnd Networkin' Nut Member

    @mvsgeek jeah I could do that. But why extra power consumption and standalone PC just for logs? I need to know if there is a way to mount unix partition to the main router with sshfs of shfs and how to do it. Really I have 24/7 Linux debian server and it would be great to export logs there. So I kinda really need to mount remote partition to tomato's main router.
  7. sputnik

    sputnik Networkin' Nut Member

    Hi frojnd. My 1st post here, hope it's not too late for you. I am successfully using sshfs on my 2.4 kernel router with Tomato Firmware v1.28.7628 -Toastman ND USB Std. (Big thanks to Toastman, this works great for me!)

    I had a couple of catastrophes with my usb stick mounted on my Asus WL520GU, so I decided to add it to a dirvish backup setup I already have had working successfully for months for my home & root partitions. Dirvish is quite happy to do it all. 1st I tried using CIFS, I already do that for access in my file browser in my machine, where it works quite well. Dirvish had some trouble with permissions on a few files, in snooping around I saw that the CIFS developers when questioned about that very issue said "why don't you try NFS?" So I did. Unfortunately in the 2.4 tomato kernel the NFS modules aren't present, leaving the userspace UNFS as the only option. This is a huge thing and my router lunched trying to do the backup with that. Next, I moved on to sshfs. Indeed, the info is a little convoluted, but this guide helped me immensely: (so you see, no need to miss a dd-wrt type wiki w/tomato :cool: )
    Dirvish backs up the USB stick flawlessly. From my machine I must log in with sudo sshfs root@ /mnt/optware -p xxxx (port number that the optware dropbear is set to use, 2222 is default). Gotta be root because of the /mnt folder location I have chosen. It all works great, the only problem I have now is automating it, it asks for my root@asus password, but I'm currently on that and will solve it. Edit: of course this was because the rsa key was approved under my username on computer, not root. Probably could have been solved but to make it easy on myself I just mount the sshfs to a temporary folder in my HOME, after it gets backed up the folder is unmounted & killed.
    Also I would note that the optware version of dropbear is yet another bit of a memory load on my itty bitty router memory, so I'm just going to schedule it to start shortly before the backup and kill it afterwards, I believe I can leave the firmware dropbear running simultaneously, if not, can kill/restart it too.
    Edit: this is working out fine. I don't try to run the dropbears simultaneously, just one or the other. One snag I hit was somehow I got the security keys out of sync between the two dropbears. I simply deleted them from one dropbear, copied them from the other, now they both work the same. The optware dropbear is about 30% or so larger, worth only pulling in for the backup and then switching back to the stock tomato dropbear for the rest of the time.
    Good luck!
  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