Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to Do a Remote Shutdown for a PC on a LAN

  1. #1
    Join Date
    May 2011
    Beans
    22

    Question How to Do a Remote Shutdown for a PC on a LAN

    So yeah,the title says it all,is there anyway to do it?
    Thanks

  2. #2
    Join Date
    Jun 2009
    Location
    Alabama
    Beans
    2,232

    Post Re: How to Do a Remote Shutdown for a PC on a LAN

    If it is a Linux (or other UNIX-like) OS and you have ssh access and root access, you can give the remote PC the command "init 0". That is a zero.

    Tim
    Cyberpower PC, Core i5 2500 3.3 gHz, 8GB DDR3, ATI 6770 1GB, Samsung BX 2440 LED 1080p, 1 TB SATA III, 2 TB SATA III, Siduction Linux 64-bit

  3. #3
    Join Date
    May 2011
    Beans
    22

    Re: How to Do a Remote Shutdown for a PC on a LAN

    Yes the other computer has Ubuntu too,can you explain a bit more?
    Thanks.

  4. #4
    Join Date
    Nov 2007
    Location
    Hungary
    Beans
    21
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to Do a Remote Shutdown for a PC on a LAN

    On the remote machine (which you want to power off) install openssh-server:

    Code:
    apt-get install openssh-server
    On your computer open up a terminal and:

    Code:
    ssh -l yourusername_on_the_remote_computer IP_OF_REMOTE_COMPUTER
    eg:
    Code:
    ssh -l john 192.168.1.100
    There will be a warning about adding the computer to the trusted ones.
    Enter: yes

    Then:
    Code:
    sudo halt
    You can execute any command just like you sit in front of the remote computer...

    Good luck!

  5. #5
    Join Date
    Sep 2010
    Beans
    34

    Re: How to Do a Remote Shutdown for a PC on a LAN

    On the computer you want to shut down, install openssh-server.
    Code:
    sudo apt-get install openssh-server
    To shut down the computer remotely:

    Open a terminal (ctrl+alt+t) and type:
    Code:
    ssh <username>@<machine ip address>
    Replace <username> and <machine ip address> with the username and ip address of the machine you want to shut down. If you don't know the ip address, type "ifconfig" into the terminal (on the machine you want to turn off remotely)

    Once your have logged in successfully with ssh, run:
    Code:
    init 0
    Alternatively, you can run "sudo shutdown -h now" or "sudo halt".
    Last edited by MDguy; August 6th, 2011 at 09:05 PM.

  6. #6
    Join Date
    May 2011
    Beans
    22

    Re: How to Do a Remote Shutdown for a PC on a LAN

    Ok I got the idea,1 more question,I could just run downstairs and check my other computers IP,but is there anyway to see it without doing that?Im using wlan.

  7. #7
    Join Date
    Nov 2007
    Location
    Hungary
    Beans
    21
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to Do a Remote Shutdown for a PC on a LAN

    You can check it via your router's web interface.
    You can also use the hostname of the machine or assign a fix address to the computer via the router's DHCP fixed leases table.

  8. #8
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,169
    Distro
    Kubuntu

    Re: How to Do a Remote Shutdown for a PC on a LAN

    set a static ip address or use the computer's name
    eg
    ssh me@lucid-desktop.local
    instead of
    ssh me@10.0.0.50
    my computer name is lucid-desktop you add the .local to it and you will have a name instead of a ip address to connect to
    Last edited by pqwoerituytrueiwoq; August 6th, 2011 at 09:23 PM. Reason: spelling
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  9. #9
    Join Date
    May 2011
    Beans
    22

    Re: How to Do a Remote Shutdown for a PC on a LAN

    Oh Is there a way to find out username and hostname of that computer?????

  10. #10
    Join Date
    May 2011
    Beans
    22

    Re: How to Do a Remote Shutdown for a PC on a LAN

    ssh: Could not resolve hostname xxx: Name or service not known

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •