• plink_path = "C:/plink.exe"     'plink.exe 路径
  • username = "username"       '用户名
  • password = "password"       '密码
  • host = "192.168.0.1"        'Unix/Linux服务器地址
  • command = "ls"                  '要执行的命令
  • Set oShell = CreateObject("WSCript.shell")
  • '拼成plink的命令,包括登陆和执行命令
  • commandLine = plink_path & " -ssh " & username & "@" & host & " -pw " & password & " " & command
  • '执行
  • Set exeRs = oShell.Exec(commandLine)
  • '获得错误信息
  • errMsg = exeRs.StdErr.ReadAll()
  • '获得标准输出信息
  • stdMsg = exeRs.StdOut.ReadAll()
  • '显示返回信息
  • msgbox stdMsg

Execute Unix Command via Putty_QTP的更多相关文章

  1. UNIX command Questions Answers asked in Interview

    UNIX or Linux operating system has become default Server operating system and for whichever programm ...

  2. DEPRECATED: Use of this script to execute hdfs command is deprecated.

    DEPRECATED: Use of this script to execute hdfs command is deprecated. 本人安装的hadoop版本是2.4.0的,但每次执行命令时都 ...

  3. hadoop2.6.0实践:A01 问题处理 DEPRECATED: Use of this script to execute hdfs command is deprecated.

    [hadoop@hadoop-master data]$ hadoop dfs -ls /DEPRECATED: Use of this script to execute hdfs command ...

  4. [UE4]游戏中服务器切换地图,控制台命令Execute console Command

    Execute console Command ServerTravel {地图名称}?listen 在服务器执行了这个命令,所有连接到该服务器的客户端都会跟着服务器同时切换到指定的地图. 1.创建一 ...

  5. error: internal error: unable to execute QEMU command 'migrate': this feature or command is not cur

    感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限.错误之处在所难免,欢迎指正. 假设转载.请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...

  6. adb错误:Failed to execute android command 'adb devices'.

    好吧,我是用的phonegap3.0开发的,很简单,安装的时候一句phonegap run android –device就可以了(-device参数非必要,我是为了不跑模拟器,加上此参数限制只跑到设 ...

  7. ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137

    错误代码如下 BUILD SUCCESSFUL in 12s 46 actionable tasks: 1 executed, 45 up-to-date Built the following ap ...

  8. Wrapper: Error - Unable to execute Java command

    在64位的系统下 将短信程序运行于服务中,出现以下错误: Error: [size=14px; line-height: 26px;]FATAL  | wrapper  | 2012/06/18 17 ...

  9. Unix command 积累

    UNIX is a multi-user multitasking-optimized operating system that can run on various hardware platfo ...

随机推荐

  1. 用shell脚本实现MongoDB数据库自动备份

    一.创建MongoDB备份目录 用来存放数据 mkdir -p /data/mongodb_bak/mongodb_bak_now mkdir -p /data/mongodb_bak/mongodb ...

  2. Linux下实现MySQL数据库每天定时自动备份

    使用MySQL自带的备份工具+ crontab 的方式来实现备份 1.查看磁盘挂载信息(选一个容量合适的) #df -h 2.创建备份目录 为了方便,在/home保存备份文件: cd /home/ga ...

  3. python- ' % '运算符的用途(非常重要)

    %运算符就是用来格式化字符串的. 在字符串内部, %s表示用字符串替换, %d表示用整数替换, 有几个%?占位符,后面就跟几个变量或者值,顺序要对应好. 如果只有一个%?,括号可以省略. 另一种格式化 ...

  4. Seq2Seq和Attention机制入门介绍

    1.Sequence Generation 1.1.引入 在循环神经网络(RNN)入门详细介绍一文中,我们简单介绍了Seq2Seq,我们在这里展开一下 一个句子是由 characters(字) 或 w ...

  5. vue 引入阿里图标

    1.去阿里图标矢量图标库将想要的图标添加入库 2.再去库中将图标添加到项目. 3.再到我的项目中,选择,我这里采用的是将图标代码包下载到本地再引入到vue项目中. 4.在vue项目的assets文件夹 ...

  6. jquery 查找元素,id,class

    查找元素下的class 带有.pageactive的a标签 $('a.pageactive') 标签a和..pageactive不要有空格,有空格找不到 ======================= ...

  7. undefined,null,!,!=之间的关系

    1.!和!=的关系 2.null 和0的关系

  8. 获取模糊匹配的div id属性

    html中有一批id,以数字+固定字符结尾,前台需要把这一批id组成数组传递给后台 假设固定结尾字符为“pic”,使用 var pidlist=$("[id$='pic']");将 ...

  9. 链接socket加异常

    try { channel = AmqpClient::Channel::Create("10.10.22.105", 5672, "admin", " ...

  10. 五、properties编写

    1.properties和yml编写对比 2.properties中文乱码解决 上面的内容输出的结果 原因 idea 默认编码是UTF-8,properties需要修改对应的编码 设置编码后的结果正常 ...