Results 1 to 9 of 9

Thread: telnet script help ?

  1. #1
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    telnet script help ?

    my new ups will not work with my thecus nas, the only way i can figure to get this to shut down is to use the apc powechute software to run a batch file when it issues the shutdown command, there is an option to run a file when it starts to shutdown the pc.

    the thecus has a module called shutdown, to get this to kick in you login as user and password shutdown, that it.

    so my question is, can someone whip me up a script that will run telnet and issue those commands to the ip 192.168.1.100 please

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

  2. #2
    Splash
    Guest

    Re: telnet script help ?

    You'd need to setup ssh key based login (or you'll be prompted for a password), then something like

    ssh root@192.168.1.100 "shutdown -h now"

    will do the job.

  3. #3
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    Re: telnet script help ?

    as simple as that!

    will give it a bash in a few thanks m8

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

  4. #4
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    Re: telnet script help ?

    plan on hold as the 3 series firmware will not allow module upload so i have to downgrade it when i can be arsed to find the flash drive with the software needed to roll back.

    or find a apc network card for a decent price to do it the easy way

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

  5. #5
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    Re: telnet script help ?

    Quote Originally Posted by Splash View Post
    You'd need to setup ssh key based login (or you'll be prompted for a password), then something like

    ssh root@192.168.1.100 "shutdown -h now"

    will do the job.
    no idea how to get that working from a windows pc to a thecus.

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

  6. #6
    Senior Member oolon's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    2,294
    Thanks
    150
    Thanked
    302 times in 248 posts
    • oolon's system
      • Motherboard:
      • Asus P6T6
      • CPU:
      • Xeon w3680
      • Memory:
      • 3*4GB Kingston ECC
      • Storage:
      • 160GB Intel G2 SSD
      • Graphics card(s):
      • XFX HD6970 2GB
      • PSU:
      • Corsair HX850
      • Case:
      • Antec P183
      • Operating System:
      • Windows 7 Ultimate and Centos 5
      • Monitor(s):
      • Dell 2408WFP
      • Internet:
      • Be* Unlimied 6 down/1.2 up

    Re: telnet script help ?

    How about you install cygwin, and use a unix style script to do it. Cygwin provides command line ssh (openssh).
    (\__/) All I wanted in the end was world domination and a whole lot of money to spend. - NMA
    (='.*=)
    (")_(*)

  7. #7
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    Re: telnet script help ?

    thanks, i will give it a bash in the morning.

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

  8. #8
    The late but legendary peterb - Onward and Upward peterb's Avatar
    Join Date
    Aug 2005
    Location
    Looking down & checking on swearing
    Posts
    19,378
    Thanks
    2,892
    Thanked
    3,403 times in 2,693 posts

    Re: telnet script help ?

    PUTTY gives SSH functionality to a Windows machine.

    http://www.chiark.greenend.org.uk/~sgtatham/putty/

    Just to clarify though - you want the UPS to issue a shutdown command to a linux based OS on powerfail (and presumably stop the shutdown if power returns?
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  9. #9
    DILLIGAF GoNz0's Avatar
    Join Date
    Jun 2006
    Location
    Derby
    Posts
    10,872
    Thanks
    632
    Thanked
    1,192 times in 945 posts
    • GoNz0's system
      • Motherboard:
      • Asus Rampage V Extreme
      • CPU:
      • i7 something X99 based
      • Memory:
      • 16gb GSkill
      • Storage:
      • 4 SSD's + WD Red
      • Graphics card(s):
      • GTX980 Strix WC
      • PSU:
      • Enermax Galaxy 1250 (9 years and counting)
      • Case:
      • Corsair 900D
      • Operating System:
      • win10 64bit
      • Monitor(s):
      • Dell 24"
      • Internet:
      • 220mb Cable

    Re: telnet script help ?

    not quite, uaually if the NAS is on I am either in the house (using it to stream movies downstairs) or its doing its auto power on routine for the 9am saturday backup of the main pc and documents. i often go out while its backing up so would like the powerchute software running on the main pc to run a config script (part of powerchute) when its shutdown time.

    sods law APC decided to change something that worked to something that no longer works with 95% of kit out there and change the way the smart UPS communicates via serial and usb so the thecus no longer knows wtf the UPS is saying.

    there way out of this is APC to sell me a legacy usb/serial communications card for £36, looks like i may as well buy that and the NAS will be able to communicate direct again. the pc will still be able to use powerchute.

    Capitalization is the difference between helping your Uncle Jack
    off a horse and helping your uncle jack off a horse.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ubuntu: Udev calling script that cannot mount
    By Raz316 in forum Software
    Replies: 3
    Last Post: 07-07-2009, 11:38 AM
  2. Replies: 3
    Last Post: 11-06-2008, 04:41 PM
  3. Shopping Cart script
    By TiMeZeRo in forum General Discussion
    Replies: 0
    Last Post: 22-09-2006, 01:33 PM
  4. Replies: 0
    Last Post: 10-02-2006, 11:28 PM
  5. keystrokes via telnet
    By Raz316 in forum Software
    Replies: 8
    Last Post: 15-06-2004, 04:48 PM

Posting Permissions

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