Archive for August, 2012

Wake-On-Lan Shell Script for Tomato

I needed a way to wake up my server when I was away. And since I run DD-WRT, I Wrote a WOL Script for it. You can read more about it here

Some people emailed me or asked via the comments section if I would create a version for Tomato, which is another popular firmware for routers

Now that I upgraded my main router to a Bufallo WZR-HP-AG300H, I had my old and trusty Buffalo WHR-G54S to play with, so I loaded Tomato on it, and decided to modify my WOL scrit for it.



Once you get the script into your router (copy and paste into VI or WinSCP), to use it, all you have to do is type “./ <servername> and the script will handle the rest

Don’t forget to “chmod +x” the script first

This script dumps out the “dhcpd_static” nvram variable into “/tmp/static.hosts”, so if you have a DHCP reservation for your server like I do, it should be included in this file as a “static” ip adress, along with the MAC address, which is what you really need for WOL to work

Facebook Twitter Email Linkedin Digg Delicious

Broke SSH in DD-WRT After Upgrade – This is How to Fix it

I recently updated my version of DD-WRT from 14xxx to the latest and greatest 18946

I know that they recommend you do the 30/30/30 reset, but you know what, I didn’t want to lose all my settings.

What I found when the router restarted, is that everything worked fine, Except for SSH

It seems that as of version 17xxx the guys are DD-WRT switched from OpenSSH to Dropbear. No big deal really, exept the SSH keys are not compatible with each other, thus preventing SSH from running.

To fix SSH:

    • Enable Telnet
    • Telnet into your router and run the following commands:
      1. cd /tmp/root/.shh/
      2. rm authorized_keys
      3. rm ssh_host_dss_key
      4. rm ssh_host_rsa_key
      5. nvram unset sshd_rsa_host_key
      6. nvram commit
      7. reboot

Once the Router Restarts, SSH should be working, and when you try to login, you will get a prompt to accept the new Key Generated by DropBear


Don’t Forget to Disable Telnet

Facebook Twitter Email Linkedin Digg Delicious
Go to Top