View Single Post
  #3  
Old 01-09-2018, 06:57 PM
awittenb awittenb is offline
Registered User
 
Join Date: Sep 2017
Posts: 9
Thanks so much. This worked perfectly.

Python code I'm using in case anyone else finds it useful:

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

SERVERS = [
    ('s1', 's1.example.com', False),
    ('s2', 's2.example.com', False),
    ('s3', 's3.example.com', True),
    ('s4', 's4.example.com', False),
]

def Main():
    for (caption, server, new_tab_group) in SERVERS:
        tab = crt.Session.ConnectInTab('/s jumpserver', True)
        tab.Caption = caption
        tab.Screen.WaitForString('> ')
        tab.Screen.Send('ssh %s\r' % server)

        if new_tab_group:
            tab.Screen.SendSpecial("MENU_TAB_SEND_TO_NEW_TAB_GROUP")

Main()
Reply With Quote