SecureCRT的Python脚本开放SSH有特殊端口

如何使用它创建具有特殊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) 

感谢

回答:

更新CMD如下:

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

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

参考:http://theory.uchicago.edu/~smaria/adam_ssh/SSH%20Secure%20Shell/documentation/SSH2.html

回答:

我明白了,谢谢 这是链接 https://forums.vandyke.com/showthread.php?t=10680

以上是 SecureCRT的Python脚本开放SSH有特殊端口 的全部内容, 来源链接: utcz.com/qa/261908.html

回到顶部