h3c服务器管理口密码修改脚本,利用脚本批量修改h3C交换机super3的密码

因安全规则要求,必须定期修改交换机密码, 而交换机数量多,所以配置了一个脚本远程自动修改。

脚本命令如下:

# $language = "VBScript"

# $interface = "1.0"

' Connect to an SSH server using the SSH2 protocol. Specify the

' username and password and hostname on the command line as well as

' some SSH2 protocol specific options.

Sub Main

Dim user

user = "***"     'ssh登录设备时的用户名

Dim passwd

passwd = "*******"    ’ssh登录的密码

Dim superpwd

superpwd="******"  '原来super3的密码

Dim fso,file,host

'打开保存设备管理地址文件

Const ForReading = 1,ForWriting = 2

Set fso = CreateObject("Scripting.FileSystemObject")

'定义一个ip列表文档,将所有交换机的ip地址单独列出,表格无需任何格式,只用每行一个ip地址就可以

Set file = fso.OpenTextFile("D:\办公文档\运维管理\修改交换机su

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值