1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WOL via SSH; ether-wake with hostname instead of MAC?

Discussion in 'Tomato Firmware' started by vexingv, Dec 21, 2008.

  1. vexingv

    vexingv LI Guru Member

    So I've recently discovered the joys of SSH and tunneling as I finally figured out how to get public/private keys working. Now, I would like to be able to WOL machines via SSH as I've encountered some firewalls that block 8080 preventing me from accessing the web gui.

    I understand that ether-wake can be used to WOL using the machine's MAC address as a parameter. However, is there a way to use the hostname as the parameter as I can't memorize the MAC address of machines on my network? The ether-wake help page states:
    How do I go about configuring/accessing the "ethers entry"? I have static DHCP entries set up in Tomato already. (*Be mindful, I'm very inexperienced with Linux and its shell...)

    Thanks.
     
  2. quinezhu

    quinezhu Addicted to LI Member

    creat wol.sh (any filename you want) in /jffs on router:
    Code:
    #!/bin/sh
    ether-wake [U]MAC address[/U]
    
    then, change its properties to excutable
    Code:
    chmod +x wol.sh
    finally, add the following to Administration>Scripts>Init
    Code:
    cat > /tmp/home/root/.profile <<EOF
      alias wol='/jffs/wol.sh'
    EOF
    
    now restart the router and just type "wol" after SSH connected
     

Share This Page