2017-12-18 283 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) 

感谢

回答