• 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. Html5 学习笔记 --》html基础 css 基础

    HTML5 功能 HTML5特点 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta cha ...

  2. spring注解开发:ComponentScan组件扫描

    在使用xml方式配置时,我们只需要在xml中配置如下代码: <context:component-scan base-package="包名"></context ...

  3. 36.Minimum Path Sum(最小路径和)

    Level:   Medium 题目描述: Given a m x n grid filled with non-negative numbers, find a path from top left ...

  4. MVC http://stackoverflow.com/tags/model-view-controller/info

    About model-view-controller Model–View–Controller (MVC) is an architectural pattern used in software ...

  5. webpack4入门到进阶案例实战课程

    愿景:"让编程不在难学,让技术与生活更加有趣" 更多教程请访问xdclass.net 第一章 webpack4前言 第一集 webpack4入门到进阶案例实战课程介绍 简介:讲述w ...

  6. common-dbcp2数据库连接池参数说明(转)

    转自:http://bsr1983.iteye.com/blog/2092467 由于commons-dbcp所用的连接池出现版本升级,因此commons-dbcp2中的数据库池连接配置也发生了变化, ...

  7. ORA-20782: Creating GGS_DDL_RULES

    在11g数据库上安装goldengate,运行@ddl_setup.sql时有如下错误 ERROR at line 1: ORA-20782: Creating GGS_DDL_RULES table ...

  8. 练手项目之image caption问题记录

    小白一个,刚刚费了老大的劲完成一个练手项目--image caption,虽然跑通了,但是评估结果却惨不忍睹.于是贴上大神的作品,留待日后慢慢消化.顺便记录下自己踩坑的一些问题. 先膜拜下大神的作品. ...

  9. python用户名密码限定次数登录

    """ 1. 用户输入帐号密码进行登陆 2. 用户信息保存在文件内 3. 用户密码输入错误三次后锁定用户"""" test.txt ...

  10. Vue项目中使用Vux

    最近想用vue+vux写一个项目,于是到vux的官网看了文档开始着手搭建项目,但是遇到一些坑.下面简单说下安装vux 的过程.默认已安装vue环境1.安装vux npm install vux --s ...