参考:https://www.jianshu.com/p/3aada3708970
https://blog.csdn.net/qq_42427912/article/details/112909860?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-112909860-blog-73039165.pc_relevant_multi_platform_whitelistv3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-112909860-blog-73039165.pc_relevant_multi_platform_whitelistv3&utm_relevant_index=2
https://www.cnblogs.com/mycyl/p/7592675.html
Sub Main
Dim user, pwd
user = "用户名"
pwd = "密码"
Dim switchs(管理地址个数减去1)
switchs(0) = "172.16.x.x"
switchs(1) = " 192.168.x.x"
switchs(n-1) = " 10.100.x.x"
For Each swip In switchs
xsh.Session.Open ("ssh://" & user& ":" & pwd & "@" & swip)
xsh.Session.Sleep(50)
xsh.Screen.WaitForString ">"
xsh.Screen.Send "dis int brief "
xsh.Screen.Send VbCrlf
xsh.Session.Sleep 100
xsh.Session.Close()
Next
End Sub