Terminal Hackings

Discussion in 'Mac Apps and Mac App Store' started by seong, Feb 14, 2010.

  1. seong macrumors 65816

    seong

    Joined:
    Feb 11, 2010
    #1
    Ok, here I go again.
    I search Youtube and Google for three hours about remotely shutting down a Mac on the same wireless network, and I can't seem to find one.
    I can't really say this is 'Hacking' since I live in a big (but not as big as you would imagine) house and I don't want to even bother shutting down the iMac on second floor when I have Macbook located in front of me and both of them are at the same network.
    I know there is Apple Software that does this, but I would like to learn how you can do that for free.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    Assuming you can log into the remote Mac with ssh you can use:

    Code:
    sudo shutdown -n now
    to shutdown the remote machine. Note this can be a bit abrupt: logged in users do not get a chance to save their work!
     
  4. seong thread starter macrumors 65816

    seong

    Joined:
    Feb 11, 2010
    #4
    Thanks for your information, but

    Thank you for telling me the command.
    I saw something like that on youtube.
    The problem is, when I do
    (this is an example) ssh -l seong 174.13.12.108
    to log in as a ssh, it asks for the password.
    I tried every single password that I know of including the computer's password, and never works.
    What is the problem?
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Is seong a valid user on the other machine? I mean if you sat down at it could you log in as seong?
     
  6. seong thread starter macrumors 65816

    seong

    Joined:
    Feb 11, 2010
    #6
    oh,

    well, that was just an example.
    It keeps saying that the password is invalid.
    IDK why.
    Ya, sure, the 'seong' is valid on the other machine.
    It's all set. My macbook, and iMac.
    Both have different name.
    iMac: seong
    Macbook: seong-hoon
     
  7. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #7

    So if you are sat on your Macbook sshing to the iMac you are trying to log in as seong? What's your ssh setup on the remote machine (in Sharing in System Preferences iirc)?
     
  8. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #8
    I'm assuming you have remote login enabled in the Sharing Preferences of the remote Mac? If so, you must be incorrectly entering the username and/or password. I use identical usernames and passwords on all my personal Macs to simplify things. I also use slightly simpler (IMO) versions of the commands you're trying to use:
    Code:
    ssh username@ip.ad.dr.ess
    sudo halt
     

Share This Page