Execute Unix Command via Putty_QTP
- 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的更多相关文章
- UNIX command Questions Answers asked in Interview
UNIX or Linux operating system has become default Server operating system and for whichever programm ...
- 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的,但每次执行命令时都 ...
- 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 ...
- [UE4]游戏中服务器切换地图,控制台命令Execute console Command
Execute console Command ServerTravel {地图名称}?listen 在服务器执行了这个命令,所有连接到该服务器的客户端都会跟着服务器同时切换到指定的地图. 1.创建一 ...
- error: internal error: unable to execute QEMU command 'migrate': this feature or command is not cur
感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限.错误之处在所难免,欢迎指正. 假设转载.请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...
- adb错误:Failed to execute android command 'adb devices'.
好吧,我是用的phonegap3.0开发的,很简单,安装的时候一句phonegap run android –device就可以了(-device参数非必要,我是为了不跑模拟器,加上此参数限制只跑到设 ...
- 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 ...
- Wrapper: Error - Unable to execute Java command
在64位的系统下 将短信程序运行于服务中,出现以下错误: Error: [size=14px; line-height: 26px;]FATAL | wrapper | 2012/06/18 17 ...
- Unix command 积累
UNIX is a multi-user multitasking-optimized operating system that can run on various hardware platfo ...
随机推荐
- 在使用bat 批处理 时将运行结果显示并保存到文件中 echo
实现原理: 因为要输出到文本,所以可以使用call将结果输出到临时文件,完成之后做3件事: 1. 将临时文本内容显示,实现窗口显示的本次运行结果的功能,可先清屏. 2. 将临时文本内容追加到日志文件用 ...
- l1和l2正则化
https://blog.csdn.net/tianguiyuyu/article/details/80438630 以上是莫烦对L1和L2的理解 l2正则:权重的平方和,也就是一个圆 l1正则:权重 ...
- 3年Java,鏖战腾讯
作者:codegoose https://segmentfault.com/a/1190000017864721 经过半年的沉淀,加上对MySQL,redis和分布式这块的补齐,终于重拾面试信心,再次 ...
- Python开发简介
年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承 . 最新的TIOBE排行榜,Python已经占据世界第四名的位置, Python崇尚优美 ...
- ret/retn人为改变执行地址
1.CALL和RET/RETN是一对指令,CALL把返回地址压入堆栈,RET/RETN把返回地址从堆栈取出,然后将IP寄存器改为该返回地址. 2.不使用CALL,而是人为地把地址放入堆栈即可实现.如 ...
- Python3学习笔记——异常处理
#!/usr/bin/env python # 1.异常处理 try: # 主要执行的代码 except IndexError as e: # 对于某些错误需要特殊处理的,可以对特殊错误进行捕捉 pr ...
- js高级编程思想
js惰性思想: 能够执行一次就搞定绝对不会执行第二次 function createXHR(){ var xhr=null, falg=false, ary=[ function(){ return ...
- node单线程
const fs=require('fs'); console.time('timer'); fs.stat('./1.txt',(err,stats)=>{ //console.log(sta ...
- SET SESSION AUTHORIZATION - 为当前会话设置会话用户标识符和当前用户标识符
SYNOPSIS SET [ SESSION | LOCAL ] SESSION AUTHORIZATION username SET [ SESSION | LOCAL ] SESSION AUTH ...
- Docker基础(上)
Docker基础(上) 链接:https://pan.baidu.com/s/1KQjKml2OZAReYwOvpWD9XQ 提取码:6vo8 复制这段内容后打开百度网盘手机App,操作更方便哦 1. ...