Shutting down other Macbooks around you through terminal?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by brian9271, Oct 28, 2008.

  1. brian9271 macrumors 6502

    brian9271

    Joined:
    Jan 31, 2008
    Location:
    Next door
    #1
    Hey there, I was wondering if I could shut down my Macbook remotely using terminal, so lets say I'm using my friends Macbook at his place, then I type my Ip Address into terminal and I shut it down, what commands would I need to type?
     
  2. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    #2
    Do a man on shutdown in terminal:
    Code:
    man shutdown
    Looks like:
    Code:
    shutdown -h now
    will do the trick.
     
  3. saltyzoo macrumors 65816

    saltyzoo

    Joined:
    Oct 4, 2007
    #3
    After you use ssh to log into your computer.
     
  4. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    #4
    Figured he knew that already, based on his question.
     
  5. brian9271 thread starter macrumors 6502

    brian9271

    Joined:
    Jan 31, 2008
    Location:
    Next door
    #5
    Uh, no, not really, where do I type my Ip Address in in order to shutdown my Mac?
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    ssh username@IPAddress
    sudo shutdown -h now

    job done.
     
  7. brian9271 thread starter macrumors 6502

    brian9271

    Joined:
    Jan 31, 2008
    Location:
    Next door
    #7
    Thanks, what's your username@IPAddress now?

    LOL, kidding ;)
     
  8. jakebogenius macrumors newbie

    jakebogenius

    Joined:
    Nov 4, 2015
  9. Achraf EA macrumors newbie

    Achraf EA

    Joined:
    Dec 7, 2016
    #9
    --- Post Merged, Dec 7, 2016 ---
    and how do we do that ?
     
  10. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    #10
    Use the ssh client from Terminal to connect:

    Code:
    ssh <username>@<IP or hostname>
     
  11. MacsRgr8 macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
    #11
    Don't forget to "allow" Remote Login" (SSH) first by enabling that in the System Prefs - Sharing tab.

    As you will understand by default remote login is off. Would be a HUGE security risk if it is left on without a very strong password!
     

Share This Page