Is it possible to remotely sleep a mac using ssh?

Discussion in 'Mac OS X 10.3 (Panther) Discussion' started by woodsey, Jan 15, 2005.

  1. woodsey macrumors regular

    Joined:
    Nov 15, 2001
    #1
    I have a PowerMac in my living room which I use to share its dial-up internet connection with the iMac in my bedroom, over ethernet.

    I often check email etc. in bedroom just before bed, and am too lazy to return to the living room to sleep the PowerMac.

    Is it possible to sleep or shutdown the PowerMac remotely using ssh over the terminal, or any other way?
     
  2. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #2
    I bet you can do this with an Applescript. If so you could invoke that from the command line.

    I keep meaning to learn it but I keep putting it off... :D

    Edit: Here ya go (I tried it, and it works):

    Code:
    osascript -e 'tell application "Finder" to sleep'
    
    Now repeat after me: Google is my friend, Google is my friend, Google ... :D
     
  3. cluthz macrumors 68040

    cluthz

    Joined:
    Jun 15, 2004
    Location:
    Norway
    #3
    You can also use this command:
    Code:
    sudo shutdown -h
    For more info run this in the terminal:
    Code:
    man shutdown
     
  4. snkTab macrumors 6502a

    snkTab

    Joined:
    Nov 13, 2004
    Location:
    Cincinnati, OH
    #4
    lol awesome, this will make me more lazy. if anyone knows how to make my mac feed my fishes if I forget let me know.
     
  5. Mechcozmo macrumors 603

    Mechcozmo

    Joined:
    Jul 17, 2004
    #5
    Make a Mac Fishtank! Linkety for you!

    :)
     
  6. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #6
    Just a note - "shutdown" is not the same as "sleep". It completely powers off your computer. Not a problem as long as that's what you're after.

    For most folks there's not much reason to completely shut off your computer though (in my opinion anyway).
     

Share This Page