Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 10-15-2013, 04:50 PM
Junho Junho is offline
Registered User
Join Date: Oct 2013
Posts: 4
sometime I send same command to 200 host. helpme.

I manage 200 Linux Redhat Servers.

Sometimes, I send same command to all host.

This script is my shell.

But my shell is too long and hard to modify...

My wish is...
- more simple and short shell
- Can managed host to seperate section

Help me.

Thank you, very,very much~

# $language = "python"
# $interface = "1.0"

# This automatically generated script may need to be
# edited in order to work correctly.

def dooo ():
crt.Screen.WaitForString("s password: ")
crt.Screen.Send("!xxxxxppp" + chr(13))
crt.Screen.WaitForString(chr(126) + "]$ ")
crt.Screen.Send("ifconfig -a" + chr(13))
crt.Screen.WaitForString(chr(126) + "]$ ")
crt.Screen.Send("su" + chr(13))
crt.Screen.WaitForString("Password: ")
crt.Screen.Send("xxxxxppp" + chr(13))
crt.Screen.WaitForString("]# ")
crt.Screen.Send("ifconfig -a" + chr(13))
crt.Screen.WaitForString("]# ")
crt.Screen.Send("exit" + chr(13))
crt.Screen.WaitForString(chr(126) + "]$ ")
crt.Screen.Send("exit" + chr(13))
crt.Screen.WaitForString(chr(126) + "]$ ")

def Main():
crt.Screen.Send("date" + chr(13))
crt.Screen.WaitForString(chr(126) + "]$ ")
crt.Screen.Send("ssh -p 2022 xxxxx@10.ooo.ooo.101" + chr(13))
crt.Screen.Send("ssh -p 2022 xxxxx@10.ooo.ooo.102" + chr(13))


crt.Screen.Send("ssh -p 2022 xxxxx@10.ooo.ooo.198" + chr(13))
crt.Screen.Send("ssh -p 2022 xxxxx@10.ooo.ooo.199" + chr(13))

Reply With Quote
Old 10-16-2013, 08:56 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,635
Hello Junho,

I am not really sure what you are trying to accomplish.

Do you have a text file that contains the hostnames/IP addresses?

If so, I think the example script available here might be better suited to the task.

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:57 AM.