Results 1 to 10 of 10

Thread: Running Linux script from Windows desktop

  1. #1
    Join Date
    Oct 2007
    Beans
    11

    Question Running Linux script from Windows desktop

    Hello,

    I am curious to know if there is a way for a script residing on a Linux server to be run from a Windows desktop? As part of our company's backup system, we rotate two sets of disk enclosures from an Ubuntu 6.06 LTS server (we are NOT looking to upgrade to allow for hotswap with Hardy Heron) and I need to find a way that a non-technical user on a Windows machine can remotely execute a shutdown script to power down the Linux server so that the enclosures can be rotated.

    Anyone have any ideas?

    Thanks,
    Greg

  2. #2
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Running Linux script from Windows desktop

    As long as the users are comfortable with the command line, it's as simple as using ssh to log in to the Ubuntu machine from Windows and run whatever commands you want using an ssh client like putty.

    If they don't like the command line, you should be able to set up putty so that a given command would automatically run on the Ubuntu machine when a user logs in via ssh. All they'd have to do is log in and the commands you need would run.

  3. #3
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Running Linux script from Windows desktop

    ssh into the linux machine and run the script.

  4. #4
    Join Date
    Oct 2007
    Beans
    178

    Re: Running Linux script from Windows desktop

    Install putty on the windows machine, have the person log in to the linux box through ssh and run the script. They should be capable of typing a username, password and a single command.

  5. #5
    Join Date
    Oct 2007
    Beans
    11

    Re: Running Linux script from Windows desktop

    Thanks for the help guys but I was actually able to find a better solution....I found that Putty's website offers plink.exe which seems to be a command line version of Putty. I'm able to create a .bat script that a user can run from their Windows desktop that will launched plink.exe along with a shutdown command.

    Greg

  6. #6
    Join Date
    Jul 2011
    Beans
    2

    Smile Re: Running Linux script from Windows desktop

    can anyone write down the actual command line for this ?

  7. #7

    Re: Running Linux script from Windows desktop

    Windows assumes the user is an idiot.
    Linux demands proof.

  8. #8
    Join Date
    Jul 2011
    Beans
    2

    Question Re: Running Linux script from Windows desktop

    I am looking for actual command line to remotely connect to linux box from windows box and remotely shutdown linux box on power outage.

    can anyone send a steps with sciprt for this ?

  9. #9
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Running Linux script from Windows desktop

    Quote Originally Posted by deartejas View Post
    I am looking for actual command line to remotely connect to linux box from windows box and remotely shutdown linux box on power outage.

    can anyone send a steps with sciprt for this ?
    You need to download an ssh client the runs on Windows, such as Putty, then connect to the Linux machine run the command:
    Code:
    shutdown -h now
    In most cases you would probably need to be logged in to the Linux machine as root to run that command, or prefix it with "sudo".

  10. #10

    Re: Running Linux script from Windows desktop

    Quote Originally Posted by deartejas View Post
    ...connect to linux box from windows box and remotely shutdown linux box on power outage....
    say what?
    Code:
    if [[ $power = "out"; then
    ssh not possible
    else
    exit
    fi
    Windows assumes the user is an idiot.
    Linux demands proof.

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
  •