• 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. fiddler如何抓取https接口

    1.Fiddler工作原理:    Fiddler 是以代理 web 服务器的形式工作的,它使用代理地址:127.0.0.1端口:8888. 当 Fiddler 退出的时候它会自动注销,这样就不会影响 ...

  2. 【Python—待解惑的问题】

    疑问1: map()函数第一个参数接收函数,所以 dict.keys() 是函数?这个不是方法吗? map(dict.keys,s) s1.keys() == dict.keys(s1) 输入: Tr ...

  3. 基于虚拟用户登录的ftp服务配置

    文章结构:             一.使用逻辑卷配置ftp数据存放目录             二.安装和配置vsftpd服务             三.使用不通权限的用户访问ftp服务器 系统环 ...

  4. redis 入门之有序集合

    zadd 将一个或多个 member 元素及其 score 值加入到有序集 key 当中.如果某个 member 已经是有序集的成员,那么更新这个 member 的 score 值,并通过重新插入这个 ...

  5. MySQL的共享锁与排它锁编码演示

    一.行锁之MySQL  使用SELECT ... FOR UPDATE 做事务写入前的确认 以MySQL 的InnoDB 为例,预设的Tansaction isolation level 为REPEA ...

  6. go读写文本文件

    一.文件读取 1. 将整个文件读取到内存中 package main import ( "flag" "fmt" "io/ioutil" ) ...

  7. docker概述与安装及运行容器

    传统虚拟化 传统虚拟化步骤 1.安装虚拟化软件以及虚拟化的管理软件 2.创建虚拟机 3.给虚拟机安装os 4.在虚拟机内部不是应用(http.db之类的应用) 传统虚拟化的特点 1.VM与VM之间是完 ...

  8. 大哥带我走渗透4(中)----oracle报错注入

    5/30 报错注入 0x01 准备阶段 1. 基础知识今天了解了,但是,只能看懂和最基本的理解,不能自己上路.所以,还是要不停学习基础.并且及时总结.这有一篇很详细的文章:https://www.cn ...

  9. Ansible --05 ansible jinja2

    ansible jinja2 什么是jinjia2模板 jinjia2是Python的全功能模块引擎 Jinjia2与Ansible的关系 Ansible通常会使用jinjia2模板来修改被管理主机的 ...

  10. Codeforces 1188C DP 鸽巢原理

    题意:定义一个序列的beauty值为序列中元素之差绝对值的最小值,现在给你一个数组,问所有长度为k的子序列的beauty值的和是多少? 思路:(官方题解)我们先解决这个问题的子问题:我们可以求出bea ...