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

Thread: Power off many remote machines.

  1. #1
    Join Date
    Nov 2009
    Location
    Damascus
    Beans
    225
    Distro
    Kubuntu

    Power off many remote machines.

    Good day!

    I am in a network that has more than 20 computers running under ubuntu.

    How can I turn all of these computers off remotely?
    100% Microsoft free.

  2. #2
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,909
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Power off many remote machines.

    you need to be logged in the machine with ssh and run the commands "poweroff" "shutdown". check the man.

    check how to configure ssh. https://help.ubuntu.com/community/SSH

    also the user loggin into the machine need to have sudo/admin priv to turnoff the machines.

    just googling around you'll find many resources like this http://z-computer-z.blogspot.com/201...reboot-on.html
    Last edited by fdrake; December 23rd, 2012 at 09:36 AM.

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  3. #3
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Power off many remote machines.

    Quote Originally Posted by ibrahim.k View Post
    Good day!

    I am in a network that has more than 20 computers running under ubuntu.

    How can I turn all of these computers off remotely?
    hi
    but don't forget to inform the oter usres before.
    use the shudown ( informs the users being loged in, give a time slice and if you got an emergeny call you can stop the shutdown on that system). to have root access on those systems you can add - at the last line - in the /etc/sudoers
    your_username ALL=NOPASSWD: /sbin/shutdown
    this to avoid a direct root loging and your ssh can run the shutdown command via sudo.
    cheers
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  4. #4
    Join Date
    Sep 2007
    Location
    In here watching you!
    Beans
    Hidden!

    Re: Power off many remote machines.

    You may want to install cssh. ClusterSSH is a tool for making the same change on multiple servers at the same time. The 'cssh' command opens an administration console and an xterm to all specified hosts. Enter the command once in the terminal and all servers get the command.
    Last edited by Old_Grey_Wolf; December 23rd, 2012 at 06:24 PM.
    Use whatever OS or desktop works for you. Backup your computer regularly, and definitely before upgrading, partitioning, or installing an OS.

    No support requests by PM please.

  5. #5
    Join Date
    Nov 2009
    Location
    Damascus
    Beans
    225
    Distro
    Kubuntu

    Re: Power off many remote machines.

    Quote Originally Posted by Old_Grey_Wolf View Post
    You may want to install cssh. ClusterSSH is a tool for making the same change on multiple servers at the same time. The 'cssh' command opens an administration console and an xterm to all specified hosts. Enter the command once in the terminal and all servers get the command.

    Could you please help me with the configuration of it?
    How can I add machines that I want to control?
    for example
    user1@machine1
    user2@machine2
    etc...
    There is a file for configuration called "Config"
    and this is it's location.
    /home/myuser/.clusterssh/
    But I don't know what should I do with it!
    and after the configuration what commands do I have to execute in order to get connected to the machines that I have configured above and where should I execute them, In a normal terminal window?

    This is the output of the config file.http://paste.ubuntu.com/1461320/

    Thank you in advance.
    Last edited by ibrahim.k; December 24th, 2012 at 08:33 AM.
    100% Microsoft free.

  6. #6
    Join Date
    Sep 2007
    Location
    In here watching you!
    Beans
    Hidden!

    Re: Power off many remote machines.

    This is a tutorial for configuring it and using it. http://www.linux.com/learn/tutorials...ith-clusterssh
    Use whatever OS or desktop works for you. Backup your computer regularly, and definitely before upgrading, partitioning, or installing an OS.

    No support requests by PM please.

  7. #7
    Join Date
    Nov 2009
    Location
    Damascus
    Beans
    225
    Distro
    Kubuntu

    Re: Power off many remote machines.

    Quote Originally Posted by Old_Grey_Wolf View Post
    This is a tutorial for configuring it and using it. http://www.linux.com/learn/tutorials...ith-clusterssh
    Good day,

    The tutorial says that I have to configure it via its global configuration file — /etc/clusters, or via a file in the user's home directory called .csshrc

    But I can't find any of these files!
    All I have is
    /home/myuser/.clusterssh/
    and it contains a file called cofing,
    It has a lot of information and scripts that I don't understand!
    http://paste.ubuntu.com/1466438/

    Thnx
    100% Microsoft free.

  8. #8
    Join Date
    Sep 2007
    Location
    In here watching you!
    Beans
    Hidden!

    Re: Power off many remote machines.

    Use whatever OS or desktop works for you. Backup your computer regularly, and definitely before upgrading, partitioning, or installing an OS.

    No support requests by PM please.

  9. #9
    Join Date
    Aug 2008
    Location
    Arizona State
    Beans
    415
    Distro
    Ubuntu

    Re: Power off many remote machines.

    hack into the local electric company's computer system and shut off the power to the area where these computers are plugged in. Fool proof!

  10. #10
    Join Date
    Nov 2009
    Location
    Damascus
    Beans
    225
    Distro
    Kubuntu

    Re: Power off many remote machines.

    Quote Originally Posted by Old_Grey_Wolf View Post
    I using kubuntu 12.10 and installed the application by typing
    "sudo apt-get install clusterssh"
    in the terminal.
    I have created a new file
    /etc/clusters
    Then configured the new location of the file
    "extra_cluster_file=/etc/clusters"
    the /etc/clusters file contains this addresses
    cluster user@172.16.0.11 user@172.16.0.12 user@172.16.0.13
    and when I type in a terminal "cssh cluster"
    I get
    Unknown configuration parameters: auto_closeibrahim@ibrahim-HP-Pavilion-dv6-Notebook:~
    ! please help.
    100% Microsoft free.

Page 1 of 2 12 LastLast

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
  •