美文网首页
Xshell打开多个session(会话)vbs脚本

Xshell打开多个session(会话)vbs脚本

作者: yiteng595 | 来源:发表于2018-02-12 14:01 被阅读0次

新建文本文档,修改后缀名为vbs,把下边的代码copy进去

Sub Main

Dim username, password

username = "用户名"

password = "密码"

Dim Hosts(主机名的个数减去1)

hosts(0) = "主机名1"

hosts(1) = " 主机名2 "

hosts(n-1) = " 主机名n"

For Each HostStr In Hosts

xsh.Session.Open ("ssh://" & username & ":" & password & "@" & HostStr)

xsh.Session.Sleep(50)

Next

End Sub

打开xshell,点击 ‘运行’,选择刚刚穿件的文件

ok!!!

相关文章

网友评论

      本文标题:Xshell打开多个session(会话)vbs脚本

      本文链接:https://www.haomeiwen.com/subject/txertftx.html