2017-12-18 282 views
1

如何使用它創建具有特殊SSH端口選項卡, 像這樣的python腳本:SecureCRT的Python腳本開放SSH有特殊端口

# $language = "python" 
# $interface = "1.0" 
host = '192.168.1.1' 
user = 'test' 
passwd = 'test' 

def main(): 
    # how to use the port 22333 for ssh 
    cmd = "/SSH2 /PASSWORD %s %[email protected]%s port=22567" % (passwd, user, host) 
    crt.Session.ConnectInTab(cmd, True) 

main() 

這是行不通的,但與默認端口22的,這是工作:

cmd = "/SSH2 /PASSWORD %s %[email protected]%s" % (passwd, user, host) 

感謝

回答