Remote shutdown on lan app/terminal code

Discussion in 'Mac OS X Lion (10.7)' started by Peter.l.knudsen, Aug 12, 2011.

  1. Peter.l.knudsen macrumors newbie

    Joined:
    Aug 12, 2011
    #1
    I would like to know how to shutdown other computers(both windows and mac) on a local wifi or lan network. I have a mac with lion, and would like some help! I believe that there must be an app for this purpose somewhere, but otherwise would some code be nice. Thanks :)

    Peter
     
  2. phyrexia, Aug 12, 2011
    Last edited: Aug 12, 2011
  3. ChristianJapan macrumors 601

    ChristianJapan

    Joined:
    May 10, 2010
    Location:
    日本
    #3
    In the Mac

    Code:
    sudo shutdown -h now
    
    If you open the terminal in Mac OS and enter

    Code:
    man shutdown
    you get more details on other helpful options

    I do that from time to time when laying in bed and too lazy to stand up; use remote shell via iPhone and switch off the iMac
     
  4. Peter.l.knudsen thread starter macrumors newbie

    Joined:
    Aug 12, 2011
    #4
    But how can i shutdown an other computer from my mac???
     
  5. ChristianJapan, Aug 13, 2011
    Last edited: Aug 13, 2011

    ChristianJapan macrumors 601

    ChristianJapan

    Joined:
    May 10, 2010
    Location:
    日本
    #5
    Code:
    ssh user@hostname
    Like

    Code:
    ssh peter@192.168.1.1
    That open you the unix shell for the target system to enter the shutdown. You would need to enable "Remote Login" on the Mac you want to login in system preferences -> Sharing.

    Right now not on my Mac, cant make a screenshot

    For Windows I don't know. I would use a Remote desktop (RDP protocol) in case your Windows variant allow that (like Ultimate).
     

Share This Page